Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ on:
jobs:
release:
runs-on: ubuntu-latest
# Declaring permissions replaces the defaults entirely, so contents: write
# has to be listed for the GitHub release. id-token: write mints the OIDC
# token cosign exchanges for a short-lived signing certificate.
permissions:
contents: write
id-token: write
steps:
- name: Code checkout
uses: actions/checkout@v5
Expand Down Expand Up @@ -36,6 +42,8 @@ jobs:
uses: actions/setup-go@v5
with:
go-version: 1.26.5
- name: Install cosign
uses: sigstore/cosign-installer@v3
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ build:
@echo "Binaries built in ./bin/"

build/goreleaser:
goreleaser release -f ./build/.goreleaser.yaml --snapshot --clean
goreleaser release -f ./build/.goreleaser.yaml --snapshot --clean --skip=sign

build/outpost:
go build -o bin/outpost ./cmd/outpost
Expand Down Expand Up @@ -144,7 +144,7 @@ logs:
# Use docker/push to push to Docker Hub: DOCKER_USER=<your-username> make docker/push TAG=v0.13.3-beta
docker/build:
@if [ -z "$(TAG)" ]; then echo "Usage: make docker/build TAG=v0.13.3-beta"; exit 1; fi
GORELEASER_CURRENT_TAG=$(TAG) goreleaser release -f ./build/.goreleaser.yaml --snapshot --clean
GORELEASER_CURRENT_TAG=$(TAG) goreleaser release -f ./build/.goreleaser.yaml --snapshot --clean --skip=sign

# Tag and push image to Docker Hub under DOCKER_USER (e.g. make docker/push DOCKER_USER=alexbouchard TAG=v0.13.3-beta).
# Requires: docker login first.
Expand Down
21 changes: 17 additions & 4 deletions build/.goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -104,16 +104,29 @@ dockers_v2:
platforms:
- linux/amd64
- linux/arm64
# No attestations, so the manifest keeps the same two platform entries as
# today. Takes both switches — buildx adds provenance on its own.
sbom: false
# Publishes an SBOM attestation; buildx adds provenance on its own.
sbom: true
flags:
- "--pull"
- "--provenance=false"
labels:
org.opencontainers.image.created: "{{ .Date }}"
org.opencontainers.image.name: "{{ .ProjectName }}"
org.opencontainers.image.revision: "{{ .FullCommit }}"
org.opencontainers.image.version: "{{ .Version }}"
repository: "https://github.com/hookdeck/outpost"
homepage: "https://hookdeck.com"

# Signs checksums.txt, which covers every archive transitively. This one runs
# before publish, so local snapshot builds pass --skip=sign to avoid needing
# cosign installed.
signs:
- cmd: cosign
signature: "${artifact}.sigstore.json"
artifacts: checksum
args: ["sign-blob", "--bundle=${signature}", "${artifact}", "--yes"]

# Keyless cosign signing via the workflow's OIDC token. Omitting --key is what
# selects keyless; publish-phase only, so --snapshot never invokes cosign.
docker_signs:
- artifacts: images
args: ["sign", "${artifact}@${digest}", "--yes"]
Loading