Skip to content

test

test #14

name: Docker Build & Publish
name: Build and Push Docker Image to GHCR

Check failure on line 3 in .github/workflows/docker-build-publish.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/docker-build-publish.yml

Invalid workflow file

You have an error in your yaml syntax on line 3
on:
push:
branches: sysrex/test_ci # or 'master'
permissions:
contents: read
packages: write # ✅ required to push to GHCR
jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Log in to GitHub Container Registry (GHCR)
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Extract metadata for image
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository }}
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}