Skip to content

Merge pull request #8 from botivater/dev/afkortingen_functie #82

Merge pull request #8 from botivater/dev/afkortingen_functie

Merge pull request #8 from botivater/dev/afkortingen_functie #82

name: Release containers
on:
push:
branches:
- 'main'
tags:
- 'v*.*.*'
jobs:
docker:
strategy:
matrix:
application: ['discordbot', 'api', 'emailer']
# runs-on: self-hosted
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
# List of Docker imges to use as base name for tags
images: |
ghcr.io/botivater/${{ matrix.application }}
# Generate Docker tags based on the following events/attributes
tags: |
type=ref,event=branch
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=sha
- name: Setup QEMU
uses: docker/setup-qemu-action@v2
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v3
with:
context: .
platforms: linux/amd64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
APP=${{ matrix.application }}