Skip to content

Commit 031d1ab

Browse files
author
Fernando Pinho
committed
release: pass --repo to gh release download in attest workflow
The attest workflow doesn't actions/checkout first (it doesn't need the source tree, only the binaries), so `gh release download` fails with "fatal: not a git repository" because gh tries to infer the repo from the working directory. Fix: pass `--repo ${{ github.repository }}` explicitly. Caught by the manual workflow_dispatch for v0.1.8.
1 parent 9a5eacf commit 031d1ab

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

.github/workflows/attest.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,13 @@ jobs:
5757
mkdir release-assets
5858
# Skip the source tarballs and installers — only the binaries
5959
# (`skillctl-*.tar.xz` / `*.zip`) need cryptographic provenance.
60+
# `--repo` is required because we don't `actions/checkout` first
61+
# (the workflow doesn't need the source tree — only the binaries
62+
# from the release). Without it, `gh` tries to infer the repo
63+
# from the working directory's git config and fails with
64+
# "not a git repository".
6065
gh release download "$TAG" \
66+
--repo "${{ github.repository }}" \
6167
--dir release-assets \
6268
--pattern 'skillctl-*-apple-darwin*' \
6369
--pattern 'skillctl-*-unknown-linux-gnu*' \

0 commit comments

Comments
 (0)