Skip to content

Commit

Permalink
Update java8-maven.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
charphi authored Feb 6, 2025
1 parent 4235fe6 commit 8494fdc
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions .github/workflows/java8-maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,14 @@ on: [ push, pull_request ]

env:
MAVEN_ARGS: "-B -ntp"
JAVA_MIN: 8
JAVA_MAX: 21

jobs:
vars-job:
name: Compute variables
runs-on: ubuntu-latest
outputs:
java_min: ${{ env.JAVA_MIN }}
java_max: ${{ env.JAVA_MAX }}
java_min: 8
java_max: 21
origin: 'nbbrd/'
steps:
- run: echo
Expand All @@ -31,8 +29,6 @@ jobs:
runs-on: ${{ matrix.os }}

steps:
- name: hello
run: echo ${{ needs.vars-job.outputs.origin }}
- name: Checkout source code
uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -65,8 +61,8 @@ jobs:
# run: mvn -U clean verify artifact:compare -DskipTests

auto-merge-job:
needs: build-and-test-job
if: startsWith(github.repository, 'nbbrd/') && github.event_name == 'pull_request' && github.actor == 'dependabot[bot]'
needs: [ vars-job, build-and-test-job ]
if: startsWith(github.repository, needs.vars-job.outputs.origin) && github.event_name == 'pull_request' && github.actor == 'dependabot[bot]'
permissions:
contents: write
pull-requests: write
Expand Down Expand Up @@ -101,7 +97,7 @@ jobs:
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: ${{ env.JAVA_MAX }}
java-version: ${{ needs.vars-job.outputs.java_max }}
cache: 'maven'

- name: Deploy snapshot with Maven if settings defined
Expand Down Expand Up @@ -130,8 +126,8 @@ jobs:
out/jreleaser/output.properties
release-job:
needs: build-and-test-job
if: startsWith(github.repository, 'nbbrd/') && startsWith(github.ref, 'refs/tags/v')
needs: [ vars-job, build-and-test-job ]
if: startsWith(github.repository, needs.vars-job.outputs.origin) && startsWith(github.ref, 'refs/tags/v')

name: Release on tag
runs-on: ubuntu-latest
Expand All @@ -147,7 +143,7 @@ jobs:
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: ${{ env.JAVA_MAX }}
java-version: ${{ needs.vars-job.outputs.java_max }}
cache: 'maven'

- name: Deploy with Maven if settings defined
Expand Down

0 comments on commit 8494fdc

Please sign in to comment.