|
8 | 8 | update-checkmarx-cli: |
9 | 9 | runs-on: ubuntu-latest |
10 | 10 | steps: |
11 | | - - uses: actions/checkout@v3.5.2 |
| 11 | + - uses: actions/checkout@v4.1.7 |
| 12 | + with: |
| 13 | + lfs: true |
| 14 | + |
| 15 | + - name: Install Git LFS |
| 16 | + run: git lfs install |
| 17 | + |
| 18 | + - name: Configure Git user |
| 19 | + run: | |
| 20 | + git config --global user.name github-actions[bot] |
| 21 | + git config --global user.email github-actions[bot]@users.noreply.github.com |
| 22 | +
|
12 | 23 | - name: Get Latest Checkmarx Java wrapper version |
13 | 24 | id: ast-cli-java-wrapper |
14 | 25 | run: | |
|
27 | 38 | cd checkmarx-ast-eclipse-plugin/lib/ |
28 | 39 | rm -rf "$current_version" |
29 | 40 | curl "https://repo1.maven.org/maven2/com/checkmarx/ast/ast-cli-java-wrapper/${{ steps.ast-cli-java-wrapper.outputs.release_tag }}/${new_version}" --output $new_version |
| 41 | + |
| 42 | + # Track the new JAR file with LFS |
| 43 | + FILE_PATH="checkmarx-ast-eclipse-plugin/lib/$new_version" # Correct path |
| 44 | + # Create the directory if it doesn't exist (important!) |
| 45 | + mkdir -p "checkmarx-ast-eclipse-plugin/lib" |
| 46 | + mv $new_version $FILE_PATH |
| 47 | + # Ensure the file exists after download |
| 48 | + if [ ! -f "$FILE_PATH" ]; then |
| 49 | + echo "Error: File $FILE_PATH not found after download." |
| 50 | + exit 1 # Fail the workflow |
| 51 | + fi |
| 52 | + git lfs track "$FILE_PATH" |
| 53 | + git add .gitattributes |
| 54 | + git add "$FILE_PATH" |
| 55 | + git commit -m "Update ast-cli-java-wrapper to ${{ steps.ast-cli-java-wrapper.outputs.release_tag }}" |
| 56 | + git push origin HEAD:${{ github.ref }} |
| 57 | +
|
30 | 58 | - name: Create Pull Request |
31 | 59 | if: steps.ast-cli-java-wrapper.outputs.current_tag != steps.ast-cli-java-wrapper.outputs.release_tag |
32 | | - uses: peter-evans/create-pull-request@v5 |
| 60 | + uses: peter-evans/create-pull-request@c5a7806660adbe173f04e3e038b0ccdcd758773c #v6.1.0 |
33 | 61 | with: |
34 | 62 | token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} |
35 | 63 | commit-message: Update ast-cli-java-wrapper to ${{ steps.ast-cli-java-wrapper.outputs.release_tag }} |
|
0 commit comments