Skip to content

Commit 646ff91

Browse files
update yml files for Integrate Git LFS (#714)
1 parent a67165d commit 646ff91

File tree

3 files changed

+61
-0
lines changed

3 files changed

+61
-0
lines changed

.github/workflows/ci.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,21 @@ jobs:
66
runs-on: ubuntu-latest
77
steps:
88
- uses: actions/checkout@v4
9+
with:
10+
lfs: true
11+
12+
- name: Install Git LFS
13+
run: |
14+
sudo apt-get update
15+
sudo apt-get install git-lfs
16+
git lfs install
17+
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+
924
- name: Use Node.js 14
1025
uses: actions/[email protected]
1126
with:
@@ -15,6 +30,25 @@ jobs:
1530
- name: Code Linting
1631
run: npm run lint
1732
- run: npm run build --if-present
33+
34+
- name: Check existence of cx-linux binary
35+
run: |
36+
if [ ! -f "src/main/wrapper/resources/cx-linux" ]; then
37+
echo "cx-linux binary does not exist"; exit 1;
38+
fi
39+
40+
- name: Check existence of cx.exe binary
41+
run: |
42+
if [ ! -f "src/main/wrapper/resources/cx.exe" ]; then
43+
echo "cx.exe binary does not exist"; exit 1;
44+
fi
45+
46+
- name: Check existence of cx-mac binary
47+
run: |
48+
if [ ! -f "src/main/wrapper/resources/cx-mac" ]; then
49+
echo "cx-mac binary does not exist"; exit 1;
50+
fi
51+
1852
- name: Run tests
1953
env:
2054
CX_CLIENT_ID: ${{ secrets.CX_CLIENT_ID}}

.github/workflows/release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ jobs:
5757
- uses: actions/checkout@v4
5858
with:
5959
fetch-depth: 0
60+
lfs: true # Ensure LFS files are checked out
6061

6162
# GIT CONFIGURATION
6263
- run: |

.github/workflows/update-cli.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,24 +9,50 @@ jobs:
99
runs-on: ubuntu-latest
1010
steps:
1111
- uses: actions/checkout@v4
12+
with:
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: Configure Git user
22+
run: |
23+
git config --global user.name github-actions
24+
git config --global user.email [email protected]
25+
1226
- name: Get Latest Checkmarx API version
1327
id: checkmarx-ast-cli
1428
run: |
1529
echo ::set-output name=release_tag::$(curl -sL https://api.github.com/repos/Checkmarx/ast-cli/releases/latest | jq -r ".tag_name")
1630
echo ::set-output name=current_tag::$(<checkmarx-ast-cli.version)
31+
1732
- name: Update Checkmarx cli version
1833
if: steps.checkmarx-ast-cli.outputs.current_tag != steps.checkmarx-ast-cli.outputs.release_tag
1934
env:
2035
RELEASE_TAG: ${{ steps.checkmarx-ast-cli.outputs.release_tag }}
2136
run: |
2237
# Update current release
2338
echo ${{ steps.checkmarx-ast-cli.outputs.release_tag }} > checkmarx-ast-cli.version
39+
40+
- name: Track large files with Git LFS
41+
run: |
42+
git lfs track "src/main/wrapper/resources/cx-linux"
43+
git lfs track "src/main/wrapper/resources/cx.exe"
44+
git lfs track "src/main/wrapper/resources/cx-mac"
45+
git add .gitattributes
46+
git add src/main/wrapper/resources/cx-linux src/main/wrapper/resources/cx.exe src/main/wrapper/resources/cx-mac
47+
git commit -m "Track Checkmarx CLI binaries with Git LFS"
48+
2449
- name: Download latest cli and update branch
2550
if: steps.checkmarx-ast-cli.outputs.current_tag != steps.checkmarx-ast-cli.outputs.release_tag
2651
run: |
2752
# Update binaries
2853
chmod +x ./.github/scripts/update_cli.sh
2954
./.github/scripts/update_cli.sh ${{ steps.checkmarx-ast-cli.outputs.release_tag }}
55+
3056
- name: Create Pull Request
3157
if: steps.checkmarx-ast-cli.outputs.current_tag != steps.checkmarx-ast-cli.outputs.release_tag
3258
uses: peter-evans/create-pull-request@c5a7806660adbe173f04e3e038b0ccdcd758773c #v6

0 commit comments

Comments
 (0)