Compare commits
1
Commits
deploy-ready
..
main
@@ -4,10 +4,6 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches: [main]
|
branches: [main]
|
||||||
tags: ["v*.*.*"]
|
tags: ["v*.*.*"]
|
||||||
# Build (but do not publish) on PRs, so a broken Dockerfile is caught before
|
|
||||||
# it reaches main rather than after. Without this the image build gets no
|
|
||||||
# coverage at all until merge.
|
|
||||||
pull_request:
|
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
env:
|
env:
|
||||||
@@ -38,7 +34,6 @@ jobs:
|
|||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
- name: Log in to GHCR
|
- name: Log in to GHCR
|
||||||
if: github.event_name != 'pull_request'
|
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
registry: ${{ env.REGISTRY }}
|
registry: ${{ env.REGISTRY }}
|
||||||
@@ -72,22 +67,16 @@ jobs:
|
|||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
context: ./client
|
context: ./client
|
||||||
# PRs only need to prove the image builds; the emulated arm64 leg is
|
platforms: linux/amd64,linux/arm64
|
||||||
# the slow part, so save it for builds that actually publish.
|
push: true
|
||||||
platforms: >-
|
|
||||||
${{ github.event_name == 'pull_request'
|
|
||||||
&& 'linux/amd64'
|
|
||||||
|| 'linux/amd64,linux/arm64' }}
|
|
||||||
push: ${{ github.event_name != 'pull_request' }}
|
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
cache-from: type=gha
|
cache-from: type=gha
|
||||||
cache-to: type=gha,mode=max
|
cache-to: type=gha,mode=max
|
||||||
provenance: ${{ github.event_name != 'pull_request' && 'mode=max' || 'false' }}
|
provenance: mode=max
|
||||||
sbom: ${{ github.event_name != 'pull_request' }}
|
sbom: true
|
||||||
|
|
||||||
- name: Attest build provenance
|
- name: Attest build provenance
|
||||||
if: github.event_name != 'pull_request'
|
|
||||||
uses: actions/attest-build-provenance@v2
|
uses: actions/attest-build-provenance@v2
|
||||||
with:
|
with:
|
||||||
subject-name: ${{ env.REGISTRY }}/${{ steps.image.outputs.name }}
|
subject-name: ${{ env.REGISTRY }}/${{ steps.image.outputs.name }}
|
||||||
|
|||||||
Reference in new issue
Block a user