Skip to content

Build containers in CI #32

Build containers in CI

Build containers in CI #32

Workflow file for this run

name: Docker container image
on:
pull_request:
branches:
- 'main'
push:
branches-ignore:
- '**'
tags:
- 'v*'
jobs:
docker:
runs-on: ubuntu-latest
steps:
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
-
name: Checkout
uses: actions/checkout@v2
-
name: Set up metadata
uses: docker/metadata-action@v4
id: meta
with:
images: ghcr.io/${{ github.repository }}
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
-
name: Login to GHCR.
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
-
name: Build and push a docker image
uses: docker/build-push-action@v3
with:
context: .
push: ${{ github.event_name == 'push' }}
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}