Skip to content

chore(deps): update busybox:1.37.0-glibc docker digest to 4279d9b #1029

chore(deps): update busybox:1.37.0-glibc docker digest to 4279d9b

chore(deps): update busybox:1.37.0-glibc docker digest to 4279d9b #1029

Workflow file for this run

name: Build and Push
on:
workflow_dispatch:
inputs:
version:
required: false
description: The version to release
prerelease:
type: boolean
default: true
description: If the version is a prerelease
push:
paths-ignore:
- "action.yml"
- "README.md"
- "website/**"
jobs:
generate-version:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.pick-version.outputs.version }}
prerelease: ${{ steps.pick-prerelease.outputs.version }}
steps:
- name: Checkout code
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
- uses: octokit/request-action@b91aabaa861c777dcdb14e2387e30eddf04619ae # v3.0.0
id: get_latest_release
with:
route: GET /repos/{repo}/releases/latest
repo: ${{ github.repository }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Generate trunkver
id: trunkver
uses: crftd-tech/trunkver@d0490489c86c5475a3e271d97c05fa928e3a8cd1 # 1.1.2
with:
baseVersion: ${{ fromJson(steps.get_latest_release.outputs.data).tag_name }}
prerelease: "true"
increment: "patch"
- name: Workflow Version Trumps Trunkver
id: pick-version
env:
WORKFLOW_VERSION: ${{ github.event.inputs.version }}
WORKFLOW_PRERELEASE: ${{ github.event.inputs.prerelease }}
TRUNKVER_VERSION: ${{ steps.trunkver.outputs.trunkver }}
run: |
set -euxo pipefail
if ! [ -z "$WORKFLOW_VERSION" ];
then
echo "version=${WORKFLOW_VERSION}" | tee "$GITHUB_OUTPUT"
echo "prereleae=${WORKFLOW_PRERELEASE}" | tee -a "$GITHUB_OUTPUT"
else
echo "version=${TRUNKVER_VERSION}" | tee "$GITHUB_OUTPUT"
echo "prereleae=true" | tee -a "$GITHUB_OUTPUT"
fi
test:
runs-on: ubuntu-latest
needs: [generate-version]
steps:
- name: Checkout code
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
- name: Setup Go
uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6
with:
go-version: 1.26
- name: Build trunkver
env:
VERSION: ${{ needs.generate-version.outputs.version }}
run: |
(
unset GITHUB_SHA
unset GITHUB_RUN_ID
make validate "VERSION=${VERSION}"
)
release:
runs-on: ubuntu-latest
needs: [generate-version, test]
if: github.ref == 'refs/heads/main'
permissions:
packages: write
contents: write
id-token: write
attestations: write
artifact-metadata: write
outputs:
imageid: ${{ steps.docker-build.outputs.imageid }}
digest: ${{ steps.docker-build.outputs.digest }}
steps:
- name: Checkout code
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
- name: Setup cosign
uses: sigstore/cosign-installer@6f9f17788090df1f26f669e9d70d6ae9567deba6 # v4.1.2
with:
cosign-release: "v2.6.0"
- name: Setup syft
run: |
curl -vL \
-O https://github.com/anchore/syft/releases/download/v1.32.0/syft_1.32.0_checksums.txt.pem \
-O https://github.com/anchore/syft/releases/download/v1.32.0/syft_1.32.0_checksums.txt.sig \
-O https://github.com/anchore/syft/releases/download/v1.32.0/syft_1.32.0_checksums.txt \
-O https://github.com/anchore/syft/releases/download/v1.32.0/syft_1.32.0_linux_amd64.tar.gz
cosign verify-blob \
--certificate syft_1.32.0_checksums.txt.pem \
--signature syft_1.32.0_checksums.txt.sig \
--certificate-identity "https://github.com/anchore/syft/.github/workflows/release.yaml@refs/heads/main" \
--certificate-oidc-issuer "https://token.actions.githubusercontent.com" \
syft_1.32.0_checksums.txt
grep syft_1.32.0_linux_amd64.tar.gz syft_1.32.0_checksums.txt | sha256sum --check
tar -zxv -C /usr/local/bin/ -f syft_1.32.0_linux_amd64.tar.gz
- name: Setup Go
uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6
with:
go-version: 1.26
- name: Build trunkver
env:
VERSION: ${{ needs.generate-version.outputs.version }}
run: |
(
unset GITHUB_SHA
unset GITHUB_RUN_ID
make build sign "VERSION=${VERSION}"
)
- name: Create release
uses: softprops/action-gh-release@b4309332981a82ec1c5618f44dd2e27cc8bfbfda # v3.0.0
with:
name: ${{ needs.generate-version.outputs.version }}
tag_name: ${{ needs.generate-version.outputs.version }}
draft: false
prerelease: ${{ needs.generate-version.outputs.prerelease }}
files: |
dist/*
- name: Log in to the Container registry
uses: docker/login-action@28fdb31ff34708d19615a74d67103ddc2ea9725c
with:
registry: "ghcr.io"
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Generate metadata
id: meta
uses: docker/metadata-action@030e881283bb7a6894de51c315a6bfe6a94e05cf # v6
with:
images: ghcr.io/${{ github.repository }}
tags: |
type=raw,value=${{ needs.generate-version.outputs.version }}
type=raw,value=latest
- name: Set up QEMU
uses: docker/setup-qemu-action@ce360397dd3f832beb865e1373c09c0e9f86d70a # v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4
- name: Build and push Docker image
uses: docker/build-push-action@9e436ba9f2d7bcd1d038c8e55d039d37896ddc5d
id: docker-build
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
provenance: mode=max
build-args: |
VERSION=${{ needs.generate-version.outputs.version }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: Sign docker image
run: cosign sign --yes ghcr.io/${{ github.repository }}@${{ steps.docker-build.outputs.digest }}
- name: Create SBOM and attest it
run: |
syft ghcr.io/${{ github.repository }}@${{ steps.docker-build.outputs.digest }} -o spdx-json=dist/docker-image.sbom.spdx.json
cosign attest \
--yes \
--type spdxjson \
--predicate dist/docker-image.sbom.spdx.json \
ghcr.io/${{ github.repository }}@${{ steps.docker-build.outputs.digest }}
- name: Add checksums to build attestations
uses: actions/attest-build-provenance@a2bbfa25375fe432b6a289bc6b6cd05ecd0c4c32 # v4.1.0
with:
subject-checksums: ./dist/checksums.txt
- name: Add digest to build attestations
uses: actions/attest-build-provenance@a2bbfa25375fe432b6a289bc6b6cd05ecd0c4c32 # v4.1.0
with:
subject-name: ghcr.io/${{ github.repository }}
subject-digest: ${{ steps.docker-build.outputs.digest }}
push-to-registry: true
update-action:
runs-on: ubuntu-latest
needs: [generate-version, release]
if: github.ref == 'refs/heads/main'
steps:
- name: Checkout code
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
- name: Update the action.yml with the new image tag
run: |
git pull origin --ff-only
yq eval \
--inplace \
'.runs.image = "docker://ghcr.io/${{ github.repository }}@${{ needs.release.outputs.digest }}"' \
action.yml
git config --global user.email "bot@crftd.tech"
git config --global user.name "crftd-bot"
git add action.yml
git commit -m "chore: Bump image tag in action.yml"
git pull origin --rebase
git push origin