Skip to content

Commit

Permalink
Fixes slsa-release action (#755)
Browse files Browse the repository at this point in the history
Tested this locally, changes are needing to limit to medic for now
(which is fine as we release the server with helm)

I also needed to quote the go release as it was being read as
go 1.2 (not 1.20)

Tested this within my fork and works for me.

Signed-off-by: Luke Hinds <luke@stacklok.com>
  • Loading branch information
lukehinds authored Aug 24, 2023
1 parent 611cd84 commit 4f2cd2c
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 33 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/slsa-go-releaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,10 @@ jobs:
arch:
- amd64
- arm64
uses: slsa-framework/slsa-github-generator/.github/workflows/builder_go_slsa3.yml@v1.9.0
uses: slsa-framework/slsa-github-generator/.github/workflows/builder_go_slsa3.yml@v1.8.0

with:
go-version: 1.20
go-version: '1.20'
private-repository: true
# Optional: only needed if using ldflags.
evaluated-envs: "COMMIT_DATE:${{needs.args.outputs.commit-date}}, COMMIT:${{needs.args.outputs.commit}}, VERSION:${{needs.args.outputs.version}}, TREE_STATE:${{needs.args.outputs.tree-state}}"
Expand Down Expand Up @@ -90,4 +91,4 @@ jobs:
slsa-verifier verify-artifact --provenance-path "$ATT_FILE_NAME" \
--source-uri "github.com/$GITHUB_REPOSITORY" \
--source-tag "$GITHUB_REF_NAME" \
"$ARTIFACT"
"$ARTIFACT"
7 changes: 2 additions & 5 deletions .slsa-goreleaser/darwin-amd64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,8 @@ goarch: amd64
# Binary output name.
# {{ .Os }} will be replaced by goos field in the config file.
# {{ .Arch }} will be replaced by goarch field in the config file.
builds:
- main: ./cmd/cli
binary: medic-{{ .Os }}-{{ .Arch }}
- main: ./cmd/server
binary: mediator-server-{{ .Os }}-{{ .Arch }}
main: ./cmd/cli
binary: medic-{{ .Os }}-{{ .Arch }}

# (Optional) ldflags generated dynamically in the workflow, and set as the `evaluated-envs` input variables in the workflow.
ldflags:
Expand Down
7 changes: 2 additions & 5 deletions .slsa-goreleaser/darwin-arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,8 @@ goarch: arm64
# Binary output name.
# {{ .Os }} will be replaced by goos field in the config file.
# {{ .Arch }} will be replaced by goarch field in the config file.
builds:
- main: ./cmd/cli
binary: medic-{{ .Os }}-{{ .Arch }}
- main: ./cmd/server
binary: mediator-server-{{ .Os }}-{{ .Arch }}
main: ./cmd/cli
binary: medic-{{ .Os }}-{{ .Arch }}

# (Optional) ldflags generated dynamically in the workflow, and set as the `evaluated-envs` input variables in the workflow.
ldflags:
Expand Down
7 changes: 2 additions & 5 deletions .slsa-goreleaser/linux-amd64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,8 @@ goarch: amd64
# Binary output name.
# {{ .Os }} will be replaced by goos field in the config file.
# {{ .Arch }} will be replaced by goarch field in the config file.
builds:
- main: ./cmd/cli
binary: medic-{{ .Os }}-{{ .Arch }}
- main: ./cmd/server
binary: mediator-server-{{ .Os }}-{{ .Arch }}
main: ./cmd/cli
binary: medic-{{ .Os }}-{{ .Arch }}

# (Optional) ldflags generated dynamically in the workflow, and set as the `evaluated-envs` input variables in the workflow.
# ldflags:
Expand Down
7 changes: 2 additions & 5 deletions .slsa-goreleaser/linux-arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,8 @@ goarch: arm64
# Binary output name.
# {{ .Os }} will be replaced by goos field in the config file.
# {{ .Arch }} will be replaced by goarch field in the config file.
builds:
- main: ./cmd/cli
binary: medic-{{ .Os }}-{{ .Arch }}
- main: ./cmd/server
binary: mediator-server-{{ .Os }}-{{ .Arch }}
main: ./cmd/cli
binary: medic-{{ .Os }}-{{ .Arch }}

# (Optional) ldflags generated dynamically in the workflow, and set as the `evaluated-envs` input variables in the workflow.
ldflags:
Expand Down
7 changes: 2 additions & 5 deletions .slsa-goreleaser/windows-amd64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,8 @@ goarch: amd64
# Binary output name.
# {{ .Os }} will be replaced by goos field in the config file.
# {{ .Arch }} will be replaced by goarch field in the config file.
builds:
- main: ./cmd/cli
binary: medic-{{ .Os }}-{{ .Arch }}
- main: ./cmd/server
binary: mediator-server-{{ .Os }}-{{ .Arch }}
main: ./cmd/cli
binary: medic-{{ .Os }}-{{ .Arch }}

# (Optional) ldflags generated dynamically in the workflow, and set as the `evaluated-envs` input variables in the workflow.
ldflags:
Expand Down
7 changes: 2 additions & 5 deletions .slsa-goreleaser/windows-arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,8 @@ goarch: arm64
# Binary output name.
# {{ .Os }} will be replaced by goos field in the config file.
# {{ .Arch }} will be replaced by goarch field in the config file.
builds:
- main: ./cmd/cli
binary: medic-{{ .Os }}-{{ .Arch }}
- main: ./cmd/server
binary: mediator-server-{{ .Os }}-{{ .Arch }}
main: ./cmd/cli
binary: medic-{{ .Os }}-{{ .Arch }}


# (Optional) ldflags generated dynamically in the workflow, and set as the `evaluated-envs` input variables in the workflow.
Expand Down

0 comments on commit 4f2cd2c

Please sign in to comment.