Skip to content

Commit 9a171c9

Browse files
update pre release
1 parent 162c48d commit 9a171c9

File tree

1 file changed

+9
-29
lines changed

1 file changed

+9
-29
lines changed

.github/workflows/update-cli.yml

Lines changed: 9 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
name: Update checkmarx ast cli
2+
23
on:
34
workflow_dispatch:
45
repository_dispatch:
@@ -23,51 +24,30 @@ jobs:
2324
git config --global user.name github-actions
2425
git config --global user.email [email protected]
2526
26-
- name: Get Latest Checkmarx API version
27+
- name: Set Hardcoded Checkmarx CLI version
2728
id: checkmarx-ast-cli
2829
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
3132
3233
- name: Update Checkmarx cli version
3334
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 }}
3635
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
3937
4038
- name: Download latest cli and update branch
4139
if: steps.checkmarx-ast-cli.outputs.current_tag != steps.checkmarx-ast-cli.outputs.release_tag
4240
run: |
43-
# Update binaries
4441
chmod +x ./.github/scripts/update_cli.sh
4542
./.github/scripts/update_cli.sh ${{ steps.checkmarx-ast-cli.outputs.release_tag }}
4643
47-
- name: Track large files with Git LFS
44+
- name: Track large files with Git LFS and commit changes
4845
if: steps.checkmarx-ast-cli.outputs.current_tag != steps.checkmarx-ast-cli.outputs.release_tag
4946
run: |
5047
git lfs track "src/main/wrapper/resources/cx-linux"
5148
git lfs track "src/main/wrapper/resources/cx.exe"
5249
git lfs track "src/main/wrapper/resources/cx-mac"
5350
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

Comments
 (0)