Skip to content

v3.37.0

v3.37.0 #660

Workflow file for this run

name: Build and publish Docker image
on:
workflow_dispatch:
release:
types: [published]
pull_request:
push:
branches:
- development
env:
REGISTRY_IMAGE: ghcr.io/yubiuser/webchanges
permissions:
contents: read
jobs:
build-prepare:
runs-on: ubuntu-24.04
outputs:
REGISTRY_IMAGE: ${{ env.REGISTRY_IMAGE }}
steps:
# FIXME: can't use env object in reusable workflow inputs: https://github.com/orgs/community/discussions/26671
- run: echo "Exposing env vars for reusable workflow"
build:
uses: docker/github-builder/.github/workflows/build.yml@v1.15.0
permissions:
contents: read
packages: write # required to push to GHCR
id-token: write # for signing attestation(s) with GitHub OIDC Token
needs:
- build-prepare
with:
distribute: true
setup-qemu: true
output: image
cache: true
cache-scope: build
fail-fast: true
push: ${{ github.actor != 'dependabot[bot]' && ( github.event.pull_request.head.repo.full_name == github.repository || github.event_name == 'push' || github.event_name == 'release' ) }}
meta-images: ${{ needs.build-prepare.outputs.REGISTRY_IMAGE }}
meta-tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=sha,enable=${{ github.event_name == 'workflow_dispatch' }}
type=ref,event=pr
type=ref,event=branch
platforms: linux/amd64,linux/arm64
# FIXME: GHCR does not support the referrers API and spams the registry with sha-tagged images when cosigned: https://github.com/docker/github-builder/issues/109
sign: false
secrets:
registry-auths: |
- registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}