Skip to content

Merge pull request #144 from eliasnogueira/fix-docker #5

Merge pull request #144 from eliasnogueira/fix-docker

Merge pull request #144 from eliasnogueira/fix-docker #5

Workflow file for this run

name: On Merge
on:
push:
branches:
- main
jobs:
build:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 22
uses: actions/setup-java@v4
with:
distribution: oracle
java-version: 22
- name: Cache Maven packages
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Build
run: mvn clean compile
- name: Test
run: mvn test
- name: Publish artifact on GitHub Packages
run: mvn deploy -DskipTests
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Publish Docker image
run: |
mvn compile jib:build \
-Djib.to.auth.username=${{ github.actor }} \
-Djib.to.auth.password=${{ secrets.GITHUB_TOKEN }}