1+ name : Update checkmarx ast cli
2+ on :
3+ workflow_dispatch :
4+ schedule :
5+ - cron : ' */5 * * * *'
6+
7+ jobs :
8+ updateCheckmarxJenkins :
9+ runs-on : ubuntu-latest
10+ steps :
11+ - uses : actions/checkout@v2
12+ - name : Get Latest Checkmarx API version
13+ id : checkmarx-ast-cli
14+ run : |
15+ echo ::set-output name=release_tag::$(curl -sL https://api.github.com/repos/CheckmarxDev/ast-cli/releases/latest | jq -r ".tag_name")
16+ echo ::set-output name=current_tag::$(<checkmarx-ast-cli.version)
17+ - name : Update Checkmarx cli version
18+ if : steps.checkmarx-ast-cli.outputs.current_tag != steps.checkmarx-ast-cli.outputs.release_tag
19+ env :
20+ RELEASE_TAG : ${{ steps.checkmarx-ast-cli.outputs.release_tag }}
21+ run : |
22+ # Update current release
23+ echo ${{ steps.checkmarx-ast-cli.outputs.release_tag }} > checkmarx-ast-cli.version
24+ - name : Download latest cli and update branch
25+ if : steps.checkmarx-ast-cli.outputs.current_tag != steps.checkmarx-ast-cli.outputs.release_tag
26+ run : |
27+ # Update binaries
28+ ./.github/scripts/update_cli.sh ${{ steps.checkmarx-ast-cli.outputs.release_tag }}
29+ - name : Create Pull Request
30+ if : steps.checkmarx-ast-cli.outputs.current_tag != steps.checkmarx-ast-cli.outputs.release_tag
31+ uses : peter-evans/create-pull-request@v3
32+ with :
33+ commit-message : Update checkmarx-ast-cli to ${{ steps.checkmarx-ast-cli.outputs.release_tag }}
34+ title : Update checkmarx-ast-cli binaries with ${{ steps.checkmarx-ast-cli.outputs.release_tag }}
35+ body : |
36+ Updates [checkmarx-ast-cli][1] to ${{ steps.checkmarx-ast-cli.outputs.release_tag }}
37+
38+ Auto-generated by [create-pull-request][2]
39+
40+ [1]: https://github.com/CheckmarxDev/checkmarx-ast-cli
41+ labels : dependencies, automated pr
42+ branch : feature/update_cli
0 commit comments