Skip to content

cds-1666 Add support for Assuming Role, Custom Role and Parameter to select Concurrency Limit #155

cds-1666 Add support for Assuming Role, Custom Role and Parameter to select Concurrency Limit

cds-1666 Add support for Assuming Role, Custom Role and Parameter to select Concurrency Limit #155

name: validate version
on:
pull_request:
types: [opened, synchronize]
branches: [master,main]
paths:
- "**/template.yaml"
- "**/cargo.toml"
jobs:
upload_files:
runs-on: ubuntu-latest
name: upload files
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: change branch
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git pull origin master
echo pull
git fetch origin
echo fetch
branch_name=${{ github.head_ref }}
git checkout ${{ github.head_ref }}
echo "branch_name=$branch_name" >> $GITHUB_ENV
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
- name: check template and cargo version
run: |
cargo_version=$(cat Cargo.toml | grep "^version" | head -1 | awk -F '"' '{print $2}')
template_version=$(cat template.yaml | grep "SemanticVersion" | grep -oE '[^ ]+$')
if [[ "$cargo_version" != "$template_version" ]]; then
echo "The template and the cargo files are NOT in the same version."
sed -i "/^\[package\]$/,/version =/ s/version = \"[^\"]*\"/version = \"$template_version\"/" Cargo.toml
else
echo "The template and the cargo files are in the same version."
fi
git add .
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
- name: update the version
uses: planetscale/[email protected]
with:
commit_message: "align cargo.toml version with template version"
repo: coralogix/coralogix-aws-shipper
branch: ${{env.branch_name}}
file_pattern: '*.yaml *.toml'
env:
GITHUB_TOKEN: ${{secrets.GH_TOKEN}}