mirror of
https://github.com/nais/wonderwall.git
synced 2026-05-09 09:56:48 +00:00
50 lines
2.0 KiB
YAML
50 lines
2.0 KiB
YAML
name: Build wonderwall
|
|
on: [push]
|
|
env:
|
|
GOOGLE_REGISTRY: europe-north1-docker.pkg.dev/nais-io/nais/images
|
|
GITHUB_REGISTRY: ghcr.io
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-20.04
|
|
steps:
|
|
- name: Checkout latest code
|
|
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # ratchet:actions/checkout@v3
|
|
- name: Set up Go
|
|
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # ratchet:actions/setup-go@v3
|
|
with:
|
|
go-version: ">=1.20.5"
|
|
- name: Test Go
|
|
run: |
|
|
make test
|
|
make check
|
|
publish-images:
|
|
needs: test
|
|
name: Publish to Google and GitHub registries
|
|
if: github.ref == 'refs/heads/master'
|
|
permissions:
|
|
contents: "read"
|
|
id-token: "write"
|
|
packages: "write"
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # ratchet:actions/checkout@v3
|
|
- name: Install cosign
|
|
uses: sigstore/cosign-installer@6e04d228eb30da1757ee4e1dd75a0ec73a653e06 # ratchet:sigstore/cosign-installer@main
|
|
with:
|
|
cosign-release: 'v2.0.0'
|
|
- name: Verify builder image
|
|
run: cosign verify --certificate-identity "https://github.com/chainguard-images/images/.github/workflows/release.yaml@refs/heads/main" --certificate-oidc-issuer "https://token.actions.githubusercontent.com" cgr.dev/chainguard/go:1.20
|
|
- name: Verify runner image
|
|
run: cosign verify --certificate-oidc-issuer https://accounts.google.com --certificate-identity keyless@distroless.iam.gserviceaccount.com gcr.io/distroless/static-debian11:nonroot
|
|
- uses: nais/platform-build-push-sign@8a57d4c61477b4d586b863e79299a6c596901057 # ratchet:nais/platform-build-push-sign@main
|
|
id: build_push_sign
|
|
with:
|
|
name: wonderwall
|
|
dockerfile: Dockerfile
|
|
google_service_account: gh-wonderwall
|
|
multi-platform: true
|
|
push: true
|
|
push_ghcr: true
|
|
workload_identity_provider: ${{ secrets.NAIS_IO_WORKLOAD_IDENTITY_PROVIDER }}
|