|
9 | 9 | runs-on: ubuntu-latest
|
10 | 10 | steps:
|
11 | 11 | - 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 | +
|
12 | 26 | - name: Get Latest Checkmarx API version
|
13 | 27 | id: checkmarx-ast-cli
|
14 | 28 | run: |
|
15 | 29 | echo ::set-output name=release_tag::$(curl -sL https://api.github.com/repos/Checkmarx/ast-cli/releases/latest | jq -r ".tag_name")
|
16 | 30 | echo ::set-output name=current_tag::$(<checkmarx-ast-cli.version)
|
| 31 | +
|
17 | 32 | - name: Update Checkmarx cli version
|
18 | 33 | if: steps.checkmarx-ast-cli.outputs.current_tag != steps.checkmarx-ast-cli.outputs.release_tag
|
19 | 34 | env:
|
20 | 35 | RELEASE_TAG: ${{ steps.checkmarx-ast-cli.outputs.release_tag }}
|
21 | 36 | run: |
|
22 | 37 | # Update current release
|
23 | 38 | 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 | +
|
24 | 49 | - name: Download latest cli and update branch
|
25 | 50 | if: steps.checkmarx-ast-cli.outputs.current_tag != steps.checkmarx-ast-cli.outputs.release_tag
|
26 | 51 | run: |
|
27 | 52 | # Update binaries
|
28 | 53 | chmod +x ./.github/scripts/update_cli.sh
|
29 | 54 | ./.github/scripts/update_cli.sh ${{ steps.checkmarx-ast-cli.outputs.release_tag }}
|
| 55 | +
|
30 | 56 | - name: Create Pull Request
|
31 | 57 | if: steps.checkmarx-ast-cli.outputs.current_tag != steps.checkmarx-ast-cli.outputs.release_tag
|
32 | 58 | uses: peter-evans/create-pull-request@c5a7806660adbe173f04e3e038b0ccdcd758773c #v6
|
|
0 commit comments