Anpassung der Aufgaben fuer die VL #2
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: Docker Build and Release | |
on: [ push ] | |
env: | |
#### An dieser Stelle müssen eure persönlichen Umgebungsvariablen eingetragen werden | |
# Tipp: Die Token/der API-Key werden als Secrets in den Repository-Settings eingetragen und hier referenziert. | |
GITHUB_ACCESSTOKEN: ${{ secrets.GITHUB_TOKEN }} | |
jobs: | |
compile: | |
name: Compile | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup Java | |
uses: actions/setup-java@v2 | |
with: | |
distribution: temurin | |
java-version: 11 | |
cache: maven | |
- name: Compile, build and push | |
run: | | |
mvn package | |
docker build --tag ghcr.io/bettercodepaul/petclinic:latest -f Dockerfile . | |
docker login --username jny-gk --password $GITHUB_ACCESSTOKEN ghcr.io | |
docker push ghcr.io/bettercodepaul/petclinic:latest |