Update checkmarx ast cli #4925
Workflow file for this run
This file contains hidden or 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: Update checkmarx ast cli | |
on: | |
workflow_dispatch: | |
repository_dispatch: | |
types: [cli-version-update] | |
jobs: | |
update-checkmarx-cli: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
lfs: true | |
- name: Install Git LFS | |
run: | | |
sudo apt-get update | |
sudo apt-get install git-lfs | |
git lfs install | |
- name: Configure Git user | |
run: | | |
git config --global user.name github-actions | |
git config --global user.email [email protected] | |
- name: Set Hardcoded Checkmarx CLI version | |
id: checkmarx-ast-cli | |
run: | | |
echo "release_tag=2.3.19-traits" >> $GITHUB_OUTPUT | |
echo "current_tag=$(<checkmarx-ast-cli.version)" >> $GITHUB_OUTPUT | |
- name: Update Checkmarx cli version | |
if: steps.checkmarx-ast-cli.outputs.current_tag != steps.checkmarx-ast-cli.outputs.release_tag | |
run: | | |
echo "${{ steps.checkmarx-ast-cli.outputs.release_tag }}" > checkmarx-ast-cli.version | |
- name: Download latest cli and update branch | |
if: steps.checkmarx-ast-cli.outputs.current_tag != steps.checkmarx-ast-cli.outputs.release_tag | |
run: | | |
chmod +x ./.github/scripts/update_cli.sh | |
./.github/scripts/update_cli.sh ${{ steps.checkmarx-ast-cli.outputs.release_tag }} | |
- name: Track large files with Git LFS and commit changes | |
if: steps.checkmarx-ast-cli.outputs.current_tag != steps.checkmarx-ast-cli.outputs.release_tag | |
run: | | |
git lfs track "src/main/wrapper/resources/cx-linux" | |
git lfs track "src/main/wrapper/resources/cx.exe" | |
git lfs track "src/main/wrapper/resources/cx-mac" | |
git add .gitattributes | |
git add src/main/wrapper/resources/cx-linux src/main/wrapper/resources/cx.exe src/main/wrapper/resources/cx-mac checkmarx-ast-cli.version | |
git commit -m "Update Checkmarx CLI to ${{ steps.checkmarx-ast-cli.outputs.release_tag }}" || echo "No changes to commit" | |
git push origin HEAD |