Skip to content

v0.20.0

v0.20.0 #51

Workflow file for this run

name: Publish a Docker image to ghcr.io
on:
release:
types:
- published
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: echo "REPO=${GITHUB_REPOSITORY,,}" >> $GITHUB_ENV
- run: echo "TAG=${GITHUB_REF##*/}" >> $GITHUB_ENV
- name: Enable buildx
uses: docker/setup-buildx-action@v3
- name: Login
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker build/push (tag)
if: github.event_name == 'release'
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: ghcr.io/${{ env.REPO }}:${{ env.TAG }}
- name: Docker build/push (latest)
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: ghcr.io/${{ env.REPO }}:latest