Use GITHUB_TOKEN as registry password #55
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |