Skip to content

Bump golang from feceecc to 4db4aac in /age (#2807) #429

Bump golang from feceecc to 4db4aac in /age (#2807)

Bump golang from feceecc to 4db4aac in /age (#2807) #429

Workflow file for this run

name: age
on:
push:
branches:
- main
paths:
- age/*
- .github/workflows/age.yml
workflow_dispatch:
schedule:
- cron: "0 8 * * 1"
env:
BUILD_VERSION: "v1.1.1"
DOCKER_CLI_EXPERIMENTAL: enabled
REPOSITORY: ${{ github.actor }}/${{ github.workflow }}
permissions: read-all
jobs:
deploy:
runs-on: ubuntu-22.04
permissions:
packages: write
id-token: write
steps:
- name: Harden Runner
uses: step-security/harden-runner@eb238b55efaa70779f274895e782ed17c84f2895
with:
disable-sudo: true
egress-policy: block
disable-telemetry: true
allowed-endpoints: >
api.github.com:443
auth.docker.io:443
dl-cdn.alpinelinux.org:443
ghcr.io:443
github.com:443
index.docker.io:443
production.cloudflare.docker.com:443
proxy.golang.org:443
registry-1.docker.io:443
- name: Source checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v2.4.0
- name: Setup QEMU
id: qemu
uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v1.2.0
- name: Setup Buildx
id: buildx
uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v1
- name: Set Docker metadata
id: docker_meta
uses: docker/metadata-action@9dc751fe249ad99385a2583ee0d084c400eee04e # v3
with:
images: ${{ env.REPOSITORY }}
tags: |
type=sha,format=long,prefix=sha256:
labels: |
org.opencontainers.image.version=${{ env.BUILD_VERSION }}
org.opencontainers.image.revision=${{ github.sha }}
org.opencontainers.image.title=${{ env.REPOSITORY }}
- name: GitHub login
if: ${{ github.event_name != 'pull_request' }}
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v1.12.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: DockerHub login
if: ${{ github.event_name != 'pull_request' }}
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v1.12.0
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Build and push
id: push-step
uses: docker/build-push-action@4a13e500e55cf31b7a5d59a38ab2040ab0f42f56 # v2.8.0
with:
push: ${{ github.event_name != 'pull_request' }}
context: ${{ github.workflow }}
#platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6,linux/ppc64le
platforms: linux/amd64,linux/386,linux/arm64,linux/arm/v7,linux/arm/v6,linux/ppc64le,linux/s390x
#platforms: linux/amd64,linux/arm64
#platforms: linux/amd64
#platforms: ${{ matrix.arch }}
build-args: |
BUILD_VERSION
sbom: true
provenance: true
cache-from: type=gha, scope=${{ github.workflow }}
cache-to: type=gha, scope=${{ github.workflow }}
labels: ${{ steps.docker_meta.outputs.labels }}
tags: |
docker.io/${{ env.REPOSITORY }}:${{ env.BUILD_VERSION }}
docker.io/${{ env.REPOSITORY }}:latest
ghcr.io/${{ env.REPOSITORY }}:${{ env.BUILD_VERSION }}
ghcr.io/${{ env.REPOSITORY }}:latest
# The following is for testing container signing and generating SBOMs
# Workaround for buildx bug: https://github.com/docker/build-push-action/issues/461
#
# Links
# https://githubhelp.com/chrisns/cosign-keyless-demo
# https://blog.chainguard.dev/zero-friction-keyless-signing-with-github-actions/
# https://github.com/mattmoor/zero-friction-actions/blob/main/.github/workflows/docker-publish.yml
# https://github.com/docker/roadmap/issues/269
# https://github.com/anchore/syft
#- name: Install cosign
# uses: sigstore/cosign-installer@9becc617647dfa20ae7b1151972e9b3a2c338a2b # v1.4.1
#- name: Install syft
# uses: anchore/sbom-action/download-syft@54e36e45f34bc64728f51adb8044404daca492a6 # v0.6.0
#- name: Sign the image digest and generate SBOM
# run: |
# cosign sign ghcr.io/${{ env.REPOSITORY }}@${{ steps.push-step.outputs.digest }}
# syft ghcr.io/${{ env.REPOSITORY }}@${{ steps.push-step.outputs.digest }} -o json > ghcr_sbom.json
# cosign attest --predicate ghcr_sbom.json ghcr.io/${{ env.REPOSITORY }}@${{ steps.push-step.outputs.digest }}
# cosign sign registry.gitlab.com/${{ github.repository }}/${{ github.workflow }}@${{ steps.push-step.outputs.digest }}
# syft registry.gitlab.com/${{ github.repository }}/${{ github.workflow }}@${{ steps.push-step.outputs.digest }} -o json > gitlab_sbom.json
# cosign attest --predicate gitlab_sbom.json registry.gitlab.com/${{ github.repository }}/${{ github.workflow }}@${{ steps.push-step.outputs.digest }}
# env:
# COSIGN_EXPERIMENTAL: 1
#- name: Verify the image digest and SBOM
# run: |
# cosign verify ghcr.io/${{ env.REPOSITORY }}@${{ steps.push-step.outputs.digest }}
# cosign verify-attestation ghcr.io/${{ env.REPOSITORY }}@${{ steps.push-step.outputs.digest }}
# cosign verify registry.gitlab.com/${{ github.repository }}/${{ github.workflow }}@${{ steps.push-step.outputs.digest }}
# cosign verify-attestation registry.gitlab.com/${{ github.repository }}/${{ github.workflow }}@${{ steps.push-step.outputs.digest }}
# env:
# COSIGN_EXPERIMENTAL: 1