Skip to content

Commit

Permalink
Improve Github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
qligier committed Nov 8, 2024
1 parent 9d68258 commit 523feec
Show file tree
Hide file tree
Showing 9 changed files with 50 additions and 43 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/angular_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,18 @@ jobs:
working-directory: ./matchbox-frontend
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
# https://github.com/actions/setup-node
node-version: 18
node-version: 20
cache: npm
cache-dependency-path: matchbox-frontend/package-lock.json

- name: Setup Java
uses: actions/setup-java@v3
uses: actions/setup-java@v4
# https://github.com/actions/setup-java#usage
with:
java-version: 21
Expand All @@ -40,7 +40,7 @@ jobs:
- name: Set up Maven
uses: stCarolas/setup-maven@v5
with:
maven-version: 3.9.6
maven-version: 3.9.9

- name: Update the project version
shell: bash
Expand All @@ -65,7 +65,7 @@ jobs:

- name: Commit
if: success()
uses: stefanzweifel/git-auto-commit-action@v4
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "server: rebuild the Angular GUI resources"
file_pattern: "matchbox-server/src/main/resources/static"
6 changes: 3 additions & 3 deletions .github/workflows/angular_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ jobs:
working-directory: ./matchbox-frontend
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
# https://github.com/actions/setup-node
node-version: 18
node-version: 20
cache: npm
cache-dependency-path: matchbox-frontend/package-lock.json

Expand Down
21 changes: 7 additions & 14 deletions .github/workflows/central_repository.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,12 @@ jobs:

steps:
- name: Checkout the repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Java
uses: actions/setup-java@v3
with:
java-version: 21
distribution: adopt
cache: maven

- name: Build with Maven
run: mvn package --batch-mode --no-transfer-progress --file pom.xml --projects :matchbox,:matchbox-engine -DskipTests -P release

- name: Setup Java 17
uses: actions/setup-java@v3
- name: Setup Java 21
uses: actions/setup-java@v4
with: # running setup-java again overwrites the settings.xml
java-version: "17"
java-version: "21"
distribution: "adopt"
cache: maven
server-id: ossrh
Expand All @@ -37,6 +27,9 @@ jobs:
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE

- name: Build with Maven
run: mvn package --batch-mode --no-transfer-progress --file pom.xml --projects :matchbox,:matchbox-engine -DskipTests -P release

- name: Publish to Apache Maven Central
run: mvn deploy -P release --file pom.xml --projects :matchbox,:matchbox-engine -DskipTests
env:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout master
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install Python 3
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.x'
cache: 'pip'
Expand All @@ -28,7 +28,7 @@ jobs:
# https://www.mkdocs.org/user-guide/deploying-your-docs/#github-pages

- name: Setup Java
uses: actions/setup-java@v3
uses: actions/setup-java@v4
# https://github.com/actions/setup-java#usage
with:
java-version: 21
Expand All @@ -39,7 +39,7 @@ jobs:
run: mvn --batch-mode --no-transfer-progress javadoc:aggregate -f pom.xml

- name: Publish Javadoc
uses: JamesIves/github-pages-deploy-action@v4.4.1
uses: JamesIves/github-pages-deploy-action@v4
# https://github.com/JamesIves/github-pages-deploy-action#configuration-
with:
branch: gh-pages # The destination branch.
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/googleregistry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@main
uses: actions/checkout@v4

- name: Build Java
uses: actions/setup-java@main
uses: actions/setup-java@v4
with:
java-version: 21
distribution: adopt
Expand All @@ -45,7 +45,7 @@ jobs:
# Configure Workload Identity Federation and generate an access token.
- id: "auth"
name: "Authenticate to Google Cloud"
uses: "google-github-actions/auth@v1"
uses: google-github-actions/auth@v2
with:
token_format: "access_token"
workload_identity_provider: "projects/1022310475153/locations/global/workloadIdentityPools/github-wif-pool/providers/oidc-github-provider"
Expand Down Expand Up @@ -112,4 +112,4 @@ jobs:
content: |
failure ${{ env.REPOSITORY }}/${{ env.IMAGE }}:${{ github.ref_name }}
see https://github.com/ahdis/matchbox/actions/runs/${{ github.run_id }}
see https://github.com/ahdis/matchbox/actions/runs/${{ github.run_id }}
14 changes: 10 additions & 4 deletions .github/workflows/integration_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,18 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout matchbox
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: matchbox

- name: Checkout integration tests
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: matchbox-int-tests
repository: ahdis/matchbox-int-tests

- name: Setup Java 21
uses: actions/setup-java@v3
uses: actions/setup-java@v4
# https://github.com/actions/setup-java#usage
with:
java-version: 21
Expand Down Expand Up @@ -56,4 +56,10 @@ jobs:
with:
name: testresults
path: ./matchbox-int-tests/target/site
retention-days: 2
retention-days: 2

- name: Test Summary
uses: test-summary/action@v2
with:
paths: "./matchbox-int-tests/target//surefire-reports/TEST-*.xml"
if: always()
4 changes: 2 additions & 2 deletions .github/workflows/javadoc_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout the project
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Java
uses: actions/setup-java@v3
uses: actions/setup-java@v4
# https://github.com/actions/setup-java#usage
with:
java-version: 21
Expand Down
14 changes: 11 additions & 3 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout the project
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Java
uses: actions/setup-java@v3
uses: actions/setup-java@v4
# https://github.com/actions/setup-java#usage
with:
java-version: 21
Expand All @@ -35,4 +35,12 @@ jobs:
path: |
./matchbox-server/target/surefire-reports
./matchbox-engine/target/surefire-reports
retention-days: 2
retention-days: 2

- name: Test Summary
uses: test-summary/action@v2
with:
paths: |
matchbox-engine/target/surefire-reports/TEST-*.xml
matchbox-server/target/surefire-reports/TEST-*.xml
if: always()
6 changes: 3 additions & 3 deletions .github/workflows/security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ jobs:

steps:
- name: Checkout the repository
uses: actions/checkout@main
uses: actions/checkout@v4

- name: Setup Java 20
uses: actions/setup-java@main
- name: Setup Java 21
uses: actions/setup-java@v4
with:
java-version: 21
distribution: adopt
Expand Down

0 comments on commit 523feec

Please sign in to comment.