Skip to content

Commit 55d067b

Browse files
authored
Merge pull request #3 from sanspace/feat/release-infra
update versions
2 parents c1e449a + 5c0e6a1 commit 55d067b

1 file changed

Lines changed: 11 additions & 16 deletions

File tree

.github/workflows/release.yml

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,10 @@ name: Release Pipeline
33
on:
44
release:
55
types: [created]
6-
workflow_dispatch: # Added for easier iterative testing as we discussed
6+
workflow_dispatch:
77

88
env:
99
REGISTRY: ghcr.io
10-
# This dynamically sets the base image name to your repo path
1110
IMAGE_BASE: ${{ github.repository }}
1211

1312
jobs:
@@ -16,7 +15,6 @@ jobs:
1615
strategy:
1716
fail-fast: false
1817
matrix:
19-
# Modernized to handle both components mentioned in your bootstrap script
2018
include:
2119
- service: backend
2220
context: ./backend
@@ -28,8 +26,9 @@ jobs:
2826
permissions:
2927
contents: read
3028
packages: write
31-
id-token: write # Required for Keyless Cosign signing
32-
security-events: write # Required to upload Trivy scan results to Security tab
29+
id-token: write # Required for OIDC and Build Provenance
30+
security-events: write
31+
attestations: write # NEW: Specifically required for official GitHub Attestations
3332

3433
steps:
3534
- name: Checkout repository
@@ -45,7 +44,7 @@ jobs:
4544
username: ${{ github.actor }}
4645
password: ${{ secrets.GITHUB_TOKEN }}
4746

48-
- name: Extract metadata (tags, labels)
47+
- name: Extract metadata
4948
id: meta
5049
uses: docker/metadata-action@v5
5150
with:
@@ -57,18 +56,18 @@ jobs:
5756
5857
- name: Build and push Docker image
5958
id: build-push
60-
uses: docker/build-push-action@v5
59+
uses: docker/build-push-action@v6 # Updated to v6
6160
with:
6261
context: ${{ matrix.context }}
6362
push: true
6463
tags: ${{ steps.meta.outputs.tags }}
6564
labels: ${{ steps.meta.outputs.labels }}
66-
# Modern Feature: GitHub Actions Cache to speed up iterative builds
6765
cache-from: type=gha
6866
cache-to: type=gha,mode=max
6967

7068
- name: Run Trivy vulnerability scanner
71-
uses: aquasecurity/trivy-action@0.20.0
69+
# Pinned to v0.35.0 specifically for security after March 2026 compromise
70+
uses: aquasecurity/trivy-action@v0.35.0
7271
with:
7372
image-ref: ${{ matrix.image }}@${{ steps.build-push.outputs.digest }}
7473
format: 'sarif'
@@ -88,16 +87,12 @@ jobs:
8887
env:
8988
DIGEST: ${{ steps.build-push.outputs.digest }}
9089
run: |
91-
# Keyless signing via GitHub OIDC
9290
cosign sign --yes "${{ matrix.image }}@${{ env.DIGEST }}"
93-
94-
# Modern Feature: Instead of just 'attaching', we create a signed attestation
95-
# This makes the SBOM part of the image's verifiable transparency log
9691
cosign attest --yes --type cyclonedx --predicate <(trivy image --format cyclonedx "${{ matrix.image }}@${{ env.DIGEST }}") "${{ matrix.image }}@${{ env.DIGEST }}"
9792
98-
- name: Generate SLSA Provenance
99-
# This provides a non-falsifiable record of where and how the image was built
100-
uses: github-early-access/generate-build-provenance@v1
93+
- name: Attest Build Provenance
94+
# Official name for the GA version of build provenance
95+
uses: actions/attest-build-provenance@v1
10196
with:
10297
subject-name: ${{ matrix.image }}
10398
subject-digest: ${{ steps.build-push.outputs.digest }}

0 commit comments

Comments
 (0)