mirror of
https://github.com/ossf/scorecard.git
synced 2024-10-26 10:28:10 +03:00
89d94606a1
Bumps the github-actions group with 3 updates in the / directory: [actions/checkout](https://github.com/actions/checkout), [github/codeql-action](https://github.com/github/codeql-action) and [ko-build/setup-ko](https://github.com/ko-build/setup-ko). Updates `actions/checkout` from 4.1.6 to 4.1.7 - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](a5ac7e51b4...692973e3d9
) Updates `github/codeql-action` from 3.25.8 to 3.25.10 - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](2e230e8fe0...23acc5c183
) Updates `ko-build/setup-ko` from 0.6 to 0.7 - [Release notes](https://github.com/ko-build/setup-ko/releases) - [Commits](ace48d7935...3aebd0597d
) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions - dependency-name: github/codeql-action dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions - dependency-name: ko-build/setup-ko dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
70 lines
2.1 KiB
YAML
70 lines
2.1 KiB
YAML
name: SLSA releaser
|
|
on:
|
|
workflow_dispatch:
|
|
# push:
|
|
# tags:
|
|
# - "*"
|
|
|
|
permissions: read-all
|
|
|
|
env:
|
|
GO_VERSION: 1.22
|
|
|
|
jobs:
|
|
# Generate ldflags dynamically.
|
|
args:
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
ldflags: ${{ steps.ldflags.outputs.value }}
|
|
go-binary-name: ${{ steps.build.outputs.go-binary-name }}
|
|
steps:
|
|
- id: checkout
|
|
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
|
with:
|
|
fetch-depth: 0
|
|
- id: ldflags
|
|
run: |
|
|
echo "value=$(./scripts/version-ldflags)" >> "$GITHUB_OUTPUT"
|
|
# Trusted builder.
|
|
build:
|
|
permissions:
|
|
id-token: write
|
|
contents: write
|
|
actions: read
|
|
needs: args
|
|
uses: slsa-framework/slsa-github-generator/.github/workflows/builder_go_slsa3.yml@v2.0.0 #7f4fdb871876c23e455853d694197440c5a91506
|
|
with:
|
|
go-version: ${{ env.GO_VERSION }}
|
|
evaluated-envs: "VERSION_LDFLAGS:${{needs.args.outputs.ldflags}}"
|
|
|
|
verification:
|
|
needs:
|
|
- build
|
|
runs-on: ubuntu-latest
|
|
permissions: read-all
|
|
steps:
|
|
- name: Install the verifier
|
|
uses: slsa-framework/slsa-verifier/actions/installer@v2.5.1
|
|
|
|
- name: Download the artifact
|
|
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
|
|
with:
|
|
name: "${{ needs.build.outputs.go-binary-name }}.intoto.jsonl"
|
|
|
|
- name: Download the artifact
|
|
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
|
|
with:
|
|
name: ${{ needs.build.outputs.go-binary-name }}
|
|
|
|
- name: Verify assets
|
|
env:
|
|
ARTIFACT: ${{ needs.build.outputs.go-binary-name }}
|
|
ATT_FILE_NAME: "${{ needs.build.outputs.go-binary-name }}.intoto.jsonl"
|
|
run: |
|
|
set -euo pipefail
|
|
|
|
echo "Verifying $ARTIFACT using $ATT_FILE_NAME"
|
|
slsa-verifier verify-artifact --provenance-path "$ATT_FILE_NAME" \
|
|
--source-uri "github.com/$GITHUB_REPOSITORY" \
|
|
"$ARTIFACT"
|