Skip to content

Use GITHUB_TOKEN as registry password #55

Use GITHUB_TOKEN as registry password

Use GITHUB_TOKEN as registry password #55

Workflow file for this run

name: Publish Docker image
on:
push:
tags:
- 'v*.*.*'
jobs:
push-to-ghcr:
name: Push image to Github Container Registry
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/metadata-action@v5
id: meta
with:
images: ghcr.io/${{ github.repository }}
- uses: docker/build-push-action@v5
with:
context: .
push: true
build-args: |
VERSION=${{ github.ref_name }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}