Add GitHub action to publish Docker image #1
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 | ||
jobs: | ||
publish-images: | ||
name: Publish Docker Images | ||
runs-on: ubuntu-latest | ||
steps: | ||
- | ||
name: Check out repo | ||
uses: actions/checkout@v4 | ||
- | ||
name: Extract metadata for Docker | ||
id: meta | ||
uses: docker/metadata-action@v4 | ||
with: | ||
images: ghcr.io/${{ GITHUB_REPOSITORY }} | ||
Check failure on line 19 in .github/workflows/publish.yaml GitHub Actions / Publish Docker imageInvalid workflow file
|
||
- | ||
name: Login to GitHub Packages | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- | ||
name: Build and push Docker image | ||
id: push | ||
uses: docker/build-push-action@v4 | ||
with: | ||
context: . | ||
file: ./Dockerfile | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} |