Update Maven plagin version and Java version in pom and yml files #47
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: java-hello-world-maven | |
on: | |
push: | |
paths: | |
- 'java-hello-world-maven/**' | |
- '.github/workflows/java-hello-world-maven.yml' | |
# pull_request: (requires EE, which is unavailable in PRs) | |
schedule: | |
- cron: "0 0 1 * *" # run every month | |
workflow_dispatch: | |
permissions: | |
contents: read | |
jobs: | |
run: | |
name: Run 'java-hello-world-maven' | |
runs-on: ubuntu-latest | |
timeout-minutes: 15 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: graalvm/setup-graalvm@v1 | |
with: | |
java-version: '21.0.1' | |
distribution: 'graalvm' | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
cache: 'maven' | |
native-image-job-reports: 'true' | |
- name: Run 'java-hello-world-maven' | |
run: | | |
cd java-hello-world-maven | |
mvn --no-transfer-progress clean package | |
java -jar target/my-app-1.0-SNAPSHOT.jar | |
mvn --no-transfer-progress clean -Pnative -DskipTests package | |
./target/my-app |