v0.1.0-rc.41 #46
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
release: | |
types: | |
- created | |
jobs: | |
build-and-push-image: | |
permissions: | |
packages: write # Used to push images to ghcr.io | |
contents: write # Used to upload assets | |
runs-on: ubuntu-latest | |
services: | |
registry: | |
image: registry:2 | |
ports: | |
- 5000:5000 | |
steps: | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
with: | |
driver-opts: network=host | |
- name: Install Cosign | |
uses: sigstore/[email protected] | |
with: | |
cosign-release: 'v2.2.1' | |
- name: Login to GHCR | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Docker meta | |
id: meta | |
uses: docker/metadata-action@v5 | |
with: | |
images: ghcr.io/akuity/kargo-render | |
flavor: latest=false | |
tags: type=semver,pattern={{raw}} | |
- name: Build base image | |
run: | | |
BASE_IMAGE=localhost:5000/kargo-render-base make build-base-image | |
docker push localhost:5000/kargo-render-base:latest-arm64 | |
docker push localhost:5000/kargo-render-base:latest-amd64 | |
- name: Build and push final image | |
uses: docker/build-push-action@v6 | |
with: | |
platforms: linux/amd64,linux/arm64 | |
build-args: | | |
BASE_IMAGE=localhost:5000/kargo-render-base | |
VERSION=${{ github.ref_name }} | |
GIT_COMMIT=${{ github.sha }} | |
GIT_TREE_STATE=clean | |
tags: ${{ steps.meta.outputs.tags }} | |
push: true | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
- name: Sign image | |
env: | |
TAGS: ${{ steps.meta.outputs.tags }} | |
COSIGN_PRIVATE_KEY: ${{ secrets.COSIGN_PRIVATE_KEY }} | |
COSIGN_PASSWORD: ${{ secrets.COSIGN_PASSWORD }} | |
run: cosign sign --key env://COSIGN_PRIVATE_KEY ${TAGS} | |
- name: Publish SBOM | |
uses: anchore/sbom-action@v0 | |
with: | |
image: ${{ steps.meta.outputs.tags }} |