Skip to content

ADR-0007 real-source rehearsal on kind: 6/6 asserts pass #69

ADR-0007 real-source rehearsal on kind: 6/6 asserts pass

ADR-0007 real-source rehearsal on kind: 6/6 asserts pass #69

Workflow file for this run

name: Release image
on:
push:
branches: [main]
tags: ["v*"]
pull_request:
branches: [main]
# Cancel superseded runs on the same ref.
concurrency:
group: release-image-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
packages: write
jobs:
image:
name: build + push (ghcr)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
# Login only when we intend to push (not on PRs).
- name: Log in to GHCR
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository }}
tags: |
type=sha,prefix=
type=ref,event=branch
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=raw,value=latest,enable={{is_default_branch}}
- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
platforms: linux/amd64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max