Skip to content

GitAction deploy fifth fix #22

GitAction deploy fifth fix

GitAction deploy fifth fix #22

Workflow file for this run

name: ace-entities
on:
push:
branches:
- master
jobs:
# Build and test the applications with multiple Java versions
build-and-test:
runs-on: ubuntu-latest
continue-on-error: true
strategy:
matrix:
java-version: [
'8',
'11',
'16',
'17',
'18',
]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: JDK Set up
uses: actions/setup-java@v3
with:
java-version: ${{ matrix.java-version }}
architecture: x64
distribution: 'temurin'
cache: 'maven'
- name: Package privacydashboard
run: mvn clean package -Pproduction
continue-on-error: true
- name: Coverage Report
run: mvn jacoco:report
- name: Deploy Jacoco code coverage reports to gh-pages
uses: JamesIves/github-pages-deploy-action@v4
if: ${{ matrix.java-version == '18' }}
with:
clean: true
folder: target/site/jacoco
target-folder: reports
branch: gh-pages
# Build files necessary for building Docker Images (Dockerfiles and Contexts)
build-for-docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
java-version: "18"
architecture: x64
distribution: 'temurin'
cache: 'maven'
- name: Prepare Dockerfiles and files for Contexts
run: docker build . --file Dockerfile --tag privacydashboard:latest
- name: Upload artifacts for Docker Image building
uses: actions/upload-artifact@v3
with:
name: files-for-docker
retention-days: 5
if-no-files-found: error
path: |
./*
# Build multiarch Docker Images and push as GitHub Packages
docker-image-push:
if: ${{ github.repository == 'sifis-home/privacydashboard' }}
needs: [build-and-test, build-for-docker]
runs-on: ubuntu-latest
steps:
- name: Download artifacts for Docker Image building
uses: actions/download-artifact@v3
with:
name: files-for-docker
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to GitHub container registry (ghcr.io)
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push image
uses: docker/build-push-action@v4
with:
context: ./
file: ./Dockerfile
push: true
tags: ghcr.io/sifis-home/privacydashboard:latest
outputs: type=registry, annotation-index.org.opencontainers.image.description=privacydashboard - Privacydashboard Image