slsa-github-generator
slsa-github-generator copied to clipboard
[bug] keys goos and goarch in .slsa-goreleaser.yml do not evaluate Go template
Describe the bug While the example at https://github.com/slsa-framework/slsa-github-generator/tree/main/internal/builders/go#configuration-file shows that Go templates are evaluated in the key ldflags, this is not the case for keys goos and goarch.
To Reproduce Steps to reproduce the behavior:
Use this form in .slsa-goreleaser.yml:
goos: "{{.Env.GOOS}}"
Use this form in the github actions workflow:
jobs:
build:
(...)
strategy:
matrix:
os:
- darwin
- linux
- window
arch:
- amd64
- arm64
uses: slsa-framework/slsa-github-generator/.github/workflows/[email protected]
with:
go-version: 1.21
evaluated-envs: "GOOS:${{matrix.os}}, GOARCH:${{matrix.arch}}"
Expected behavior A single .slsa-goreleaser.yml can be used even for cross-compiling.
Related to #63