Skip to content

Publish Docker Images #651

Publish Docker Images

Publish Docker Images #651

name: Publish Docker Images
on:
push:
branches: [master, cicd]
schedule:
- cron: 0 0 * * 1
jobs:
build-images:
runs-on: ubuntu-latest
strategy:
matrix:
flavor: [sacher, blackforest, malakoff, redvelvet]
continue-on-error: true
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.PAT }}
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD}}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: |
simurlacra/simurlacra:${{matrix.flavor}}
ghcr.io/${{ github.repository_owner }}/simurlacra:${{ matrix.flavor }}
build-args: |
OPTION=${{ matrix.flavor }}
no-cache: ${{ github.event_name == 'schedule' }}
cache-from: type=registry,ref=ghcr.io/${{ github.repository_owner }}/simurlacra:${{ matrix.flavor }}
cache-to: type=inline,mode=max