Skip to content

Workflow file for this run

name: Docker build and publish
on:
release:
types: [published]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup QEMU
uses: docker/setup-qemu-action@v3
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Setup env
run: |
echo CONTAINER_IMAGE=ghcr.io/${GITHUB_REPOSITORY,,}:${GITHUB_REF#refs/*/} >> $GITHUB_ENV
echo CONTAINER_IMAGE_LATEST=ghcr.io/${GITHUB_REPOSITORY,,}:latest >> $GITHUB_ENV
- name: Login
run: docker login -u $GITHUB_ACTOR -p ${{secrets.GITHUB_TOKEN}} ghcr.io
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ env.CONTAINER_IMAGE }},${{ env.CONTAINER_IMAGE_LATEST }}