Skip to content

Commit

Permalink
Replace unpinned actions with pinned action
Browse files Browse the repository at this point in the history
  • Loading branch information
stacklokbot committed Jan 24, 2024
1 parent ddc177a commit 31f8d86
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 26 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
cache-to: type=gha,mode=max
- name: generate build provenance
if: ${{ github.event_name != 'pull_request' }}
uses: github-early-access/generate-build-provenance@main
uses: github-early-access/generate-build-provenance@e9e8ff9e95bfdd79719197569bb666e2889c2e55 # main
with:
subject-name: ${{ steps.meta.outputs.tags }}
subject-digest: ${{ steps.build-and-push.outputs.digest }}
Expand Down
48 changes: 23 additions & 25 deletions .github/workflows/main.yml
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

0 comments on commit 31f8d86

Please sign in to comment.