Skip to content

Commit

Permalink
Adds attest provenance
Browse files Browse the repository at this point in the history
  • Loading branch information
Cyb3r-Jak3 committed Jan 26, 2025
1 parent eec7958 commit 7f4ebde
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 23 deletions.
30 changes: 10 additions & 20 deletions .github/workflows/golang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ permissions:
security-events: write
actions: write
packages: write
contents: read
id-token: write
attestations: write

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -47,16 +50,7 @@ jobs:
uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: false

- uses: actions/cache@v4
with:
path: |
~\AppData\Local\go-build
~\go\pkg\mod
key: go-${{ hashFiles('go.sum') }}
restore-keys: |
go-
cache: true

- name: Install Syft
run: choco install syft --yes
Expand Down Expand Up @@ -98,18 +92,10 @@ jobs:
uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: false
cache: true

- name: Install Syft
run: choco install syft --yes

- uses: actions/cache@v4
with:
path: |
~\AppData\Local\go-build
~\go\pkg\mod
key: go-${{ hashFiles('go.sum') }}

- name: Download AutoComplete file
run: Invoke-WebRequest -Uri https://raw.githubusercontent.com/urfave/cli/v2.25.7/autocomplete/bash_autocomplete -OutFile bash_completion

Expand All @@ -131,4 +117,8 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
CHOCOLATEY_API_KEY: ${{ secrets.CHOCOLATEY_API_KEY }}
AWS_ACCESS_KEY_ID: ${{ secrets.R2_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.R2_SECRET_ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.R2_SECRET_ACCESS_KEY }}

- uses: actions/attest-build-provenance@v2
with:
subject-checksums: ./cmd/cloudflare-utils/dist/checksums.txt
6 changes: 3 additions & 3 deletions cmd/cloudflare-utils/.goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ builds:
binary: cloudflare-utils
mod_timestamp: '{{ .CommitTimestamp }}'
ldflags:
- -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}}'
- -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.CommitDate}}'
- -extldflags "-static"


archives:
- format: tar.xz
- formats: ['tar.xz']
format_overrides:
- goos: windows
format: zip
formats: ['zip']
name_template: "{{ .Binary }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}{{ if .Mips }}_{{ .Mips }}{{ end }}"

checksum:
Expand Down

0 comments on commit 7f4ebde

Please sign in to comment.