Skip to content

Commit 911a227

Browse files
update-cli.yml (AST-48101) (#725)
* update-cli.yml (AST-48101) adds a condition to the Git LFS commit step to ensure that commits are only made if there are changes to commit * Update ci.yml
1 parent 04aaa7c commit 911a227

File tree

2 files changed

+8
-13
lines changed

2 files changed

+8
-13
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,6 @@ jobs:
1515
sudo apt-get install git-lfs
1616
git lfs install
1717
18-
# GIT CONFIGURATION
19-
- name: Configure Git user
20-
run: |
21-
git config --global user.email "[email protected]"
22-
git config --global user.name "Your Name"
23-
2418
- name: Use Node.js 14
2519
uses: actions/[email protected]
2620
with:

.github/workflows/update-cli.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,15 @@ jobs:
3737
# Update current release
3838
echo ${{ steps.checkmarx-ast-cli.outputs.release_tag }} > checkmarx-ast-cli.version
3939
40+
- name: Download latest cli and update branch
41+
if: steps.checkmarx-ast-cli.outputs.current_tag != steps.checkmarx-ast-cli.outputs.release_tag
42+
run: |
43+
# Update binaries
44+
chmod +x ./.github/scripts/update_cli.sh
45+
./.github/scripts/update_cli.sh ${{ steps.checkmarx-ast-cli.outputs.release_tag }}
46+
4047
- name: Track large files with Git LFS
48+
if: steps.checkmarx-ast-cli.outputs.current_tag != steps.checkmarx-ast-cli.outputs.release_tag
4149
run: |
4250
git lfs track "src/main/wrapper/resources/cx-linux"
4351
git lfs track "src/main/wrapper/resources/cx.exe"
@@ -46,13 +54,6 @@ jobs:
4654
git add src/main/wrapper/resources/cx-linux src/main/wrapper/resources/cx.exe src/main/wrapper/resources/cx-mac
4755
git commit -m "Track Checkmarx CLI binaries with Git LFS"
4856
49-
- name: Download latest cli and update branch
50-
if: steps.checkmarx-ast-cli.outputs.current_tag != steps.checkmarx-ast-cli.outputs.release_tag
51-
run: |
52-
# Update binaries
53-
chmod +x ./.github/scripts/update_cli.sh
54-
./.github/scripts/update_cli.sh ${{ steps.checkmarx-ast-cli.outputs.release_tag }}
55-
5657
- name: Create Pull Request
5758
if: steps.checkmarx-ast-cli.outputs.current_tag != steps.checkmarx-ast-cli.outputs.release_tag
5859
uses: peter-evans/create-pull-request@c5a7806660adbe173f04e3e038b0ccdcd758773c #v6

0 commit comments

Comments
 (0)