-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace unpinned actions with pinned action
- Loading branch information
1 parent
ddc177a
commit 31f8d86
Showing
2 changed files
with
24 additions
and
26 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
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 |
---|---|---|
@@ -1,35 +1,33 @@ | ||
name: build-binary | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: [ "main" ] | ||
branches: ["main"] | ||
pull_request: | ||
branches: [ "main" ] | ||
|
||
branches: ["main"] | ||
jobs: | ||
build: | ||
permissions: | ||
id-token: write | ||
packages: write | ||
contents: write | ||
id-token: write | ||
packages: write | ||
contents: write | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v4 | ||
- name: Set up Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: '1.21' | ||
- name: Run Go build | ||
run: | | ||
go build -v -o demo-go ./... | ||
- name: Sign artifact | ||
uses: github-early-access/generate-build-provenance@main | ||
with: | ||
subject-path: '${{ github.workspace }}/demo-go' | ||
- name: Upload artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: demo-go-binary | ||
path: demo-go | ||
- name: Check out code | ||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 | ||
- name: Set up Go | ||
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5 | ||
with: | ||
go-version: '1.21' | ||
- name: Run Go build | ||
run: | | ||
go build -v -o demo-go ./... | ||
- name: Sign artifact | ||
uses: github-early-access/generate-build-provenance@e9e8ff9e95bfdd79719197569bb666e2889c2e55 # main | ||
with: | ||
subject-path: '${{ github.workspace }}/demo-go' | ||
- name: Upload artifact | ||
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3 | ||
with: | ||
name: demo-go-binary | ||
path: demo-go |