Skip to content

fix: build args

fix: build args #5

name: Build and push Docker image to GHCR

Check failure on line 1 in .github/workflows/build-and-publish.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/build-and-publish.yaml

Invalid workflow file

(Line: 52, Col: 13): A sequence was not expected, (Line: 54, Col: 13): A sequence was not expected
on:
push:
branches:
- master
schedule:
- cron: "0 0 * * 0" # Weekly on Sundays at midnight
jobs:
build-and-push:
runs-on: windows-latest
permissions:
contents: read
packages: write
attestations: write
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Docker Buildx (docker driver for Windows)
uses: docker/setup-buildx-action@v3
with:
driver: docker
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository }}
tags: |
type=raw,value=latest
type=ref,event=branch
type=sha
- name: Build and push Docker image
id: push
uses: docker/build-push-action@v6
with:
context: .
push: true
platforms:
- windows/amd64
build-args:
- WINDOWS_VERSION=ltsc2025
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}