Skip to content

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@v2
- run: echo "REPO=${GITHUB_REPOSITORY,,}" >> $GITHUB_ENV
- run: echo "TAG=${GITHUB_REF##*/}" >> $GITHUB_ENV
- name: Enable buildx
uses: docker/setup-buildx-action@v1
- name: Login
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker build/push
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: ghcr.io/${{ env.REPO }}:${{ env.TAG }}
- name: Docker build/push
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: ghcr.io/${{ env.REPO }}:latest