File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -23,11 +23,16 @@ jobs:
2323 java-version : ' 17'
2424 distribution : ' zulu'
2525 cache : ' maven'
26+ - name : Set short commit sha
27+ id : variables
28+ run : |
29+ calculatedSha=$(git rev-parse --short ${{github.sha}})
30+ echo "SHORT_SHA=$calculatedSha" >> $GITHUB_ENV
2631
2732 - name : Build project
2833 id : build
2934 run : |
30- ./mvnw -B -ntp versions:set -DnewVersion=$GITHUB_SHA
35+ ./mvnw -B -ntp versions:set -DnewVersion=$SHORT_SHA
3136 ./mvnw -B -V -ntp clean package -DskipTests
3237 export VERSION=$(./mvnw -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec)
3338 echo "version=${VERSION}" >> $GITHUB_OUTPUT
4247 uses : actions/cache@v4
4348 with :
4449 path : /tmp/.buildx-cache
45- key : ${{ runner.os }}-buildx-${{ github.sha }}
50+ key : ${{ runner.os }}-buildx-${{ env.SHORT_SHA }}
4651 restore-keys : |
4752 ${{ runner.os }}-buildx-
4853
You can’t perform that action at this time.
0 commit comments