Show error log only when there was actually an exception (#15) #38
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: Build and push new docker image | |
on: | |
push: | |
branches: [ master ] | |
# adds a "run workflow" button to the page | |
workflow_dispatch: | |
jobs: | |
build-deploy-jar: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up JDK 1.11 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 1.11 | |
- name: Build with Maven | |
run: mvn -B package --file pom.xml --no-transfer-progress | |
# needed for multi-platform builds | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
# needed for multi-platform builds | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v1 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} # provided by GitHub | |
- name: Build and push image | |
uses: docker/build-push-action@v3 | |
with: | |
# needed for multi-platform builds | |
platforms: linux/amd64,linux/arm64 | |
context: . | |
push: true | |
tags: ghcr.io/jckleiner/notion-backup:latest | |
build-args: | | |
PATH_TO_JAR=./target/notion-backup-1.0-SNAPSHOT.jar | |