-
Notifications
You must be signed in to change notification settings - Fork 496
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* SLSA build * missing files * updates * updates * updates * indent fix * update * update * updates * updates * updates * updates
- Loading branch information
1 parent
2c34a46
commit 3b7c46f
Showing
4 changed files
with
66 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: SLSA releaser | ||
on: | ||
workflow_dispatch: | ||
push: | ||
tags: | ||
- "*" | ||
|
||
permissions: read-all | ||
|
||
jobs: | ||
# Generate ldflags dynamically. | ||
args: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
ldflags: ${{ steps.ldflags.outputs.value }} | ||
steps: | ||
- id: checkout | ||
uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579 # v2.3.4 | ||
with: | ||
fetch-depth: 0 | ||
- id: ldflags | ||
run: | | ||
echo "::set-output name=value::$(./scripts/version-ldflags)" | ||
# 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@v1.0.0 | ||
with: | ||
go-version: 1.17 | ||
evaluated-envs: "VERSION_LDFLAGS:${{needs.args.outputs.ldflags}}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,7 +29,6 @@ builds: | |
goos: | ||
- linux | ||
goarch: | ||
- amd64 | ||
- arm64 | ||
- 386 | ||
- arm | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
version: 1 | ||
env: | ||
- GO111MODULE=on | ||
# https://stackoverflow.com/a/62821358/19407 | ||
- CGO_ENABLED=0 | ||
|
||
flags: | ||
- -trimpath | ||
- -tags=netgo | ||
|
||
goos: linux | ||
goarch: amd64 | ||
binary: scorecard-{{ .Os }}-{{ .Arch }} | ||
ldflags: | ||
- -s {{ .Env.VERSION_LDFLAGS }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters