Skip to content

Commit 40872dd

Browse files
update yml files for Integrate Git LFS (AST-48101) (#343)
* update yml files for Integrate Git LFS * fix path files * add checkout LFS
1 parent f9ab60c commit 40872dd

File tree

3 files changed

+50
-0
lines changed

3 files changed

+50
-0
lines changed

.github/workflows/ci.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,17 @@ jobs:
1010
uses: actions/checkout@v4
1111
with:
1212
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
13+
lfs: true
14+
15+
- name: Install Git LFS
16+
run: |
17+
sudo apt-get update
18+
sudo apt-get install git-lfs
19+
git lfs install
20+
21+
- name: Checkout LFS objects
22+
run: git lfs checkout
23+
1324

1425
- name: Cache local Maven repository
1526
uses: actions/cache@v4
@@ -30,6 +41,22 @@ jobs:
3041
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
3142
gpg-passphrase: MAVEN_GPG_PASSPHRASE
3243

44+
- name: Check existence of cx-linux binary
45+
run: |
46+
if [ ! -f "src/main/resources/cx-linux" ]; then
47+
echo "cx-linux binary does not exist"; exit 1;
48+
fi
49+
- name: Check existence of cx.exe binary
50+
run: |
51+
if [ ! -f "src/main/resources/cx.exe" ]; then
52+
echo "cx.exe binary does not exist"; exit 1;
53+
fi
54+
- name: Check existence of cx-mac binary
55+
run: |
56+
if [ ! -f "src/main/resources/cx-mac" ]; then
57+
echo "cx-mac binary does not exist"; exit 1;
58+
fi
59+
3360
- name: Run tests with Maven
3461
run: mvn -B test --file pom.xml
3562
env:

.github/workflows/release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ jobs:
4040
uses: actions/checkout@v4
4141
with:
4242
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
43+
lfs: true
4344

4445
- name: Download CLI
4546
if: inputs.cliTag

.github/workflows/update-cli.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,19 @@ jobs:
1111
steps:
1212
- name: Checkout
1313
uses: actions/checkout@v4
14+
with:
15+
lfs: true
16+
17+
- name: Install Git LFS
18+
run: |
19+
sudo apt-get update
20+
sudo apt-get install git-lfs
21+
git lfs install
22+
23+
- name: Configure Git user
24+
run: |
25+
git config --global user.name github-actions
26+
git config --global user.email github-actions@github.com
1427
1528
- name: Get Latest Checkmarx API version
1629
id: checkmarx-ast-cli
@@ -26,6 +39,15 @@ jobs:
2639
# Update current release
2740
echo ${{ steps.checkmarx-ast-cli.outputs.release_tag }} > checkmarx-ast-cli.version
2841
42+
- name: Track large files with Git LFS
43+
run: |
44+
git lfs track "src/main/resources/cx-linux"
45+
git lfs track "src/main/resources/cx.exe"
46+
git lfs track "src/main/resources/cx-mac"
47+
git add .gitattributes
48+
git add src/main/resources/cx-linux src/main/resources/cx.exe src/main/resources/cx-mac
49+
git commit -m "Track Checkmarx CLI binaries with Git LFS"
50+
2951
- name: Download latest cli and update branch
3052
if: steps.checkmarx-ast-cli.outputs.current_tag != steps.checkmarx-ast-cli.outputs.release_tag
3153
run: |

0 commit comments

Comments
 (0)