Skip to content

Commit

Permalink
Merge pull request #134 from aiven/harden-workflow
Browse files Browse the repository at this point in the history
fix: Harden workflow
  • Loading branch information
Stefan Arentz authored Oct 24, 2022
2 parents 68434f7 + 5475b83 commit f9e8500
Showing 1 changed file with 17 additions and 13 deletions.
30 changes: 17 additions & 13 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,29 @@ name: Java CI with Maven

on:
push:
branches: [ "main" ]
branches: ["main"]
pull_request:
branches: [ "main" ]
branches: ["main"]

permissions:
contents: read

jobs:
build:
strategy:
matrix:
java-version: [ 11, 17 ]
runs-on: [ ubuntu-latest ]
java-version: [11, 17]
runs-on: [ubuntu-latest]
name: Jdk ${{ matrix.java-version }}, os ${{ matrix.runs-on }}
runs-on: ${{ matrix.runs-on }}
steps:
- uses: actions/checkout@v3
- name: Set up JDK ${{ matrix.java-version }}
uses: actions/setup-java@v3
with:
java-version: ${{ matrix.java-version }}
distribution: 'temurin'
cache: maven
- name: Build and run tests with Maven
run: mvn --batch-mode --update-snapshots verify
- uses: actions/checkout@v3
- name: Set up JDK ${{ matrix.java-version }}
uses: actions/setup-java@v3
with:
java-version: ${{ matrix.java-version }}
distribution: "temurin"
cache: maven
persist-credentials: false
- name: Build and run tests with Maven
run: mvn --batch-mode --update-snapshots verify

0 comments on commit f9e8500

Please sign in to comment.