Skip to content
This repository was archived by the owner on Aug 6, 2026. It is now read-only.

.github/workflows/e2e.go.workflow_dispatch.main.tagname-noldflags.slsa3.yml #1340

.github/workflows/e2e.go.workflow_dispatch.main.tagname-noldflags.slsa3.yml

.github/workflows/e2e.go.workflow_dispatch.main.tagname-noldflags.slsa3.yml #1340

on:
schedule:
- cron: "0 6 * * *"
workflow_dispatch:
permissions: read-all
concurrency: "e2e.go.workflow_dispatch.main.tagname-noldflags.slsa3"
env:
GH_TOKEN: ${{ secrets.E2E_GO_TOKEN }}
ISSUE_REPOSITORY: slsa-framework/slsa-github-generator
# WARNING: update build job if CONFIG_FILE changes.
CONFIG_FILE: .github/configs-go/config-noldflags.yml
DEFAULT_VERSION: v30.0.0
jobs:
release:
runs-on: ubuntu-latest
outputs:
tag: ${{ steps.create.outputs.tag }}
permissions:
contents: write
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- id: create
run: ./.github/workflows/scripts/e2e-create-release.sh
build:
needs: [release]
permissions:
id-token: write # For signing.
contents: write # For asset uploads.
actions: read # For the entrypoint.
uses: slsa-framework/slsa-github-generator/.github/workflows/builder_go_slsa3.yml@main
with:
go-version: "1.24"
# We cannot use ${{ env.CONFIG_FILE }} because env variables are not available.
config-file: .github/configs-go/config-noldflags.yml
compile-builder: true
upload-tag-name: "${{ needs.release.outputs.tag }}"
upload-assets: true
verify:
runs-on: ubuntu-latest
needs: [release, build]
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: ${{ needs.build.outputs.go-binary-name }}
- name: Download provenance
env:
PROVENANCE: ${{ needs.build.outputs.go-binary-name }}.intoto.jsonl
TAG: ${{ needs.release.outputs.tag }}
run: gh release download "$TAG" -p "$PROVENANCE"
- uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6.5.0
with:
go-version: "1.26"
- env:
BINARY: ${{ needs.build.outputs.go-binary-name }}
# NOTE: we download the artifact as `${{ needs.build.outputs.go-binary-name }}.intoto.jsonl`,
# so we implictely verify that `${{ needs.build.outputs.go-binary-name }}.intoto.jsonl = ${{ needs.build.outputs.go-provenance-name }}`.
PROVENANCE: ${{ needs.build.outputs.go-provenance-name }}
run: ./.github/workflows/scripts/e2e.go.default.verify.sh
if-succeeded:
runs-on: ubuntu-latest
needs: [release, build, verify]
if: needs.build.result == 'success' && needs.verify.result == 'success'
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- run: ./.github/workflows/scripts/e2e-report-success.sh
if-failed:
runs-on: ubuntu-latest
needs: [release, build, verify]
if: always() && (needs.build.result == 'failure' || needs.verify.result == 'failure')
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- run: ./.github/workflows/scripts/e2e-report-failure.sh