feat: change manifest for 1.14.0 (#820) #24
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
# when we add a tag to the repo, we should publish the kured image to a public repository | |
# if it's safe. | |
# It doesn't mean it's ready for release, but at least it's getting us started. | |
# The next step is to have a PR with the helm chart, to bump the version of the image used | |
name: Tag repo | |
on: | |
push: | |
tags: | |
- "*" | |
env: | |
REGISTRY: ghcr.io | |
IMAGE_NAME: ${{ github.repository }} | |
jobs: | |
tag-scan-and-push-final-image: | |
name: "Build, scan, and publish tagged image" | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
contents: write | |
packages: write | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Ensure go version | |
uses: actions/setup-go@v4 | |
with: | |
go-version-file: 'go.mod' | |
check-latest: true | |
- name: Find current tag version | |
run: echo "version=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT | |
id: tags | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Setup GoReleaser | |
run: make bootstrap-tools | |
- name: Build binaries | |
run: make kured-release-tag | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build single image for scan | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
platforms: linux/amd64 | |
push: false | |
load: true | |
tags: | | |
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.tags.outputs.version }} | |
- name: Run Trivy vulnerability scanner | |
uses: aquasecurity/trivy-action@41f05d9ecffa2ed3f1580af306000f734b733e54 | |
with: | |
image-ref: '${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.tags.outputs.version }}' | |
format: 'table' | |
exit-code: '1' | |
ignore-unfixed: true | |
vuln-type: 'os,library' | |
severity: 'CRITICAL,HIGH' | |
- name: Login to ghcr.io | |
uses: docker/login-action@v2 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Extract metadata (tags, labels) for Docker | |
id: meta | |
uses: docker/metadata-action@818d4b7b91585d195f67373fd9cb0332e31a7175 | |
with: | |
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | |
- name: Build release images | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
platforms: linux/arm64, linux/amd64, linux/arm/v7, linux/arm/v6, linux/386 | |
push: true | |
labels: ${{ steps.meta.outputs.labels }} | |
tags: | | |
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.tags.outputs.version }} | |
- name: Generate SBOM | |
run: | | |
.tmp/syft ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.tags.outputs.version }} -o spdx > kured.sbom | |
- name: Sign and attest artifacts | |
run: | | |
.tmp/cosign sign -y -r ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.tags.outputs.version }} | |
.tmp/cosign sign-blob -y --output-signature kured.sbom.sig kured.sbom | |
.tmp/cosign attest -y --type spdx --predicate kured.sbom ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.tags.outputs.version }} | |
.tmp/cosign attach sbom --type spdx --sbom kured.sbom ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.tags.outputs.version }} |