Skip to content

Commit

Permalink
Update cve_checks.yml with SHORT_SHA
Browse files Browse the repository at this point in the history
  • Loading branch information
vivekkoya authored Oct 17, 2024
1 parent b4ffd96 commit 0bd7fe7
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/cve_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,16 @@ jobs:
java-version: '17'
distribution: 'zulu'
cache: 'maven'
- name: Set short commit sha
id: variables
run: |
calculatedSha=$(git rev-parse --short ${{github.sha}})
echo "SHORT_SHA=$calculatedSha" >> $GITHUB_ENV
- name: Build project
id: build
run: |
./mvnw -B -ntp versions:set -DnewVersion=$GITHUB_SHA
./mvnw -B -ntp versions:set -DnewVersion=$SHORT_SHA
./mvnw -B -V -ntp clean package -DskipTests
export VERSION=$(./mvnw -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec)
echo "version=${VERSION}" >> $GITHUB_OUTPUT
Expand All @@ -42,7 +47,7 @@ jobs:
uses: actions/cache@v4
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
key: ${{ runner.os }}-buildx-${{ env.SHORT_SHA }}
restore-keys: |
${{ runner.os }}-buildx-
Expand Down

0 comments on commit 0bd7fe7

Please sign in to comment.