Allow the lambda to run with provided.al2 runtime V1.0.13[CDS-1437] #146
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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}} |