File tree Expand file tree Collapse file tree 1 file changed +20
-1
lines changed Expand file tree Collapse file tree 1 file changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -16,10 +16,29 @@ permissions:
1616 contents : read
1717
1818jobs :
19+ validate :
20+ runs-on : ubuntu-latest
21+ outputs :
22+ is-snapshot : ${{ steps.validate-step.outputs.is-snapshot }}
23+ steps :
24+ - name : Checkout
25+ uses : actions/checkout@v4
26+ - name : Validate version is a snapshot version
27+ id : validate-step
28+ run : |
29+ output=false
30+ if [[ "$(./mvnw -q help:evaluate -Dexpression=project.version -DforceStdout)" =~ "-SNAPSHOT" ]]; then
31+ echo "This is a snapshot version"
32+ output=true
33+ fi
34+ echo "is-snapshot=${output}" >> "$GITHUB_OUTPUT"
35+
1936 deploy :
2037 name : Deploy
2138 runs-on : ubuntu-latest
22-
39+ needs :
40+ - validate
41+ if : ${{ contains(needs.validate.outputs.is-snapshot, 'true') }}
2342 steps :
2443 - id : buildkite
2544 name : Run Deploy
You can’t perform that action at this time.
0 commit comments