Skip to content

Update checkmarx ast cli #14203

Update checkmarx ast cli

Update checkmarx ast cli #14203

Workflow file for this run

name: Update checkmarx ast cli
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * *'
jobs:
update-checkmarx-cli:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
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: Get Latest Checkmarx API version
id: checkmarx-ast-cli
run: |
echo ::set-output name=release_tag::$(curl -sL https://api.github.com/repos/CheckmarxDev/ast-cli/releases/latest | jq -r ".tag_name")
echo ::set-output name=current_tag::$(<checkmarx-ast-cli.version)
- name: Update Checkmarx cli version
if: steps.checkmarx-ast-cli.outputs.current_tag != steps.checkmarx-ast-cli.outputs.release_tag
env:
RELEASE_TAG: ${{ steps.checkmarx-ast-cli.outputs.release_tag }}
run: |
# Update current release
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: |
# Update binaries
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
if: steps.checkmarx-ast-cli.outputs.current_tag != steps.checkmarx-ast-cli.outputs.release_tag
run: |
git lfs track "checkmarx-ast-teamcity-plugin-agent/src/runner/bin/2.0.0/cx"
git lfs track "checkmarx-ast-teamcity-plugin-agent/src/runner/bin/2.0.0/cx.exe"
git lfs track "checkmarx-ast-teamcity-plugin-agent/src/runner/bin/2.0.0/cx-mac"
git add .gitattributes
git add checkmarx-ast-teamcity-plugin-agent/src/runner/bin/2.0.0/cx checkmarx-ast-teamcity-plugin-agent/src/runner/bin/2.0.0/cx.exe checkmarx-ast-teamcity-plugin-agent/src/runner/bin/2.0.0/cx-mac
git commit -m "Track Checkmarx CLI binaries with Git LFS"
- name: Create Pull Request
if: steps.checkmarx-ast-cli.outputs.current_tag != steps.checkmarx-ast-cli.outputs.release_tag
uses: peter-evans/create-pull-request@c5a7806660adbe173f04e3e038b0ccdcd758773c #v6.1.0
with:
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
commit-message: Update checkmarx-ast-cli to ${{ steps.checkmarx-ast-cli.outputs.release_tag }}
title: Update checkmarx-ast-cli binaries with ${{ steps.checkmarx-ast-cli.outputs.release_tag }}
body: |
Updates [checkmarx-ast-cli][1] to ${{ steps.checkmarx-ast-cli.outputs.release_tag }}
Auto-generated by [create-pull-request][2]
[1]: https://github.com/CheckmarxDev/checkmarx-ast-cli
labels: cxone
branch: feature/update_cli