1
1
name : Update checkmarx ast cli
2
+
2
3
on :
3
4
workflow_dispatch :
4
5
repository_dispatch :
@@ -23,51 +24,30 @@ jobs:
23
24
git config --global user.name github-actions
24
25
git config --global user.email [email protected]
25
26
26
- - name : Get Latest Checkmarx API version
27
+ - name : Set Hardcoded Checkmarx CLI version
27
28
id : checkmarx-ast-cli
28
29
run : |
29
- echo ::set-output name= release_tag::$(curl -sL https://api.github.com/repos/Checkmarx/ast-cli/releases/latest | jq -r ".tag_name")
30
- echo ::set-output name= current_tag:: $(<checkmarx-ast-cli.version)
30
+ echo " release_tag=2.3.19-traits" >> $GITHUB_OUTPUT
31
+ echo " current_tag= $(<checkmarx-ast-cli.version)" >> $GITHUB_OUTPUT
31
32
32
33
- name : Update Checkmarx cli version
33
34
if : steps.checkmarx-ast-cli.outputs.current_tag != steps.checkmarx-ast-cli.outputs.release_tag
34
- env :
35
- RELEASE_TAG : ${{ steps.checkmarx-ast-cli.outputs.release_tag }}
36
35
run : |
37
- # Update current release
38
- echo ${{ steps.checkmarx-ast-cli.outputs.release_tag }} > checkmarx-ast-cli.version
36
+ echo "${{ steps.checkmarx-ast-cli.outputs.release_tag }}" > checkmarx-ast-cli.version
39
37
40
38
- name : Download latest cli and update branch
41
39
if : steps.checkmarx-ast-cli.outputs.current_tag != steps.checkmarx-ast-cli.outputs.release_tag
42
40
run : |
43
- # Update binaries
44
41
chmod +x ./.github/scripts/update_cli.sh
45
42
./.github/scripts/update_cli.sh ${{ steps.checkmarx-ast-cli.outputs.release_tag }}
46
43
47
- - name : Track large files with Git LFS
44
+ - name : Track large files with Git LFS and commit changes
48
45
if : steps.checkmarx-ast-cli.outputs.current_tag != steps.checkmarx-ast-cli.outputs.release_tag
49
46
run : |
50
47
git lfs track "src/main/wrapper/resources/cx-linux"
51
48
git lfs track "src/main/wrapper/resources/cx.exe"
52
49
git lfs track "src/main/wrapper/resources/cx-mac"
53
50
git add .gitattributes
54
- git add src/main/wrapper/resources/cx-linux src/main/wrapper/resources/cx.exe src/main/wrapper/resources/cx-mac
55
- git commit -m "Track Checkmarx CLI binaries with Git LFS"
56
-
57
- - name : Create Pull Request
58
- id : cretae_pull_request
59
- if : steps.checkmarx-ast-cli.outputs.current_tag != steps.checkmarx-ast-cli.outputs.release_tag
60
- uses : peter-evans/create-pull-request@c5a7806660adbe173f04e3e038b0ccdcd758773c # v6
61
- with :
62
- token : ${{ secrets.AUTOMATION_TOKEN }}
63
- commit-message : Update checkmarx-ast-cli to ${{ steps.checkmarx-ast-cli.outputs.release_tag }}
64
- title : Update checkmarx-ast-cli binaries with ${{ steps.checkmarx-ast-cli.outputs.release_tag }}
65
- body : |
66
- Updates [checkmarx-ast-cli][1] to ${{ steps.checkmarx-ast-cli.outputs.release_tag }}
67
-
68
- Auto-generated by [create-pull-request][2]
69
-
70
- [1]: https://github.com/Checkmarx/checkmarx-ast-cli
71
- labels : cxone
72
- branch : feature/update_cli_${{ steps.checkmarx-ast-cli.outputs.release_tag }}
73
-
51
+ git add src/main/wrapper/resources/cx-linux src/main/wrapper/resources/cx.exe src/main/wrapper/resources/cx-mac checkmarx-ast-cli.version
52
+ git commit -m "Update Checkmarx CLI to ${{ steps.checkmarx-ast-cli.outputs.release_tag }}" || echo "No changes to commit"
53
+ git push origin HEAD
0 commit comments