ci: gate cosign/sbom/attest steps to github only
cosign keyless sign uses Sigstore Fulcio which requires a Fulcio-trusted OIDC issuer. Forgejo runs don't have one, so cosign falls back to the interactive device flow and times out (error obtaining token: expired_token). Same applies to attest-build-provenance and the SBOM action's signed attestation. Skip all three on Forgejo for now; ISO + sha256 are sufficient for v0.5.x test releases. Re-add when we self-host a Sigstore stack or sign with a key-pair instead of keyless.
This commit is contained in:
parent
b9df392fbc
commit
c2b4df8ef9
1 changed files with 4 additions and 4 deletions
8
.github/workflows/build-iso.yml
vendored
8
.github/workflows/build-iso.yml
vendored
|
|
@ -174,12 +174,12 @@ jobs:
|
|||
ls "${ISO}".part-*
|
||||
|
||||
- name: Install cosign
|
||||
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
|
||||
if: (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && github.server_url == 'https://github.com'
|
||||
# Pinned to last v3 release confirmed node20.
|
||||
uses: sigstore/cosign-installer@v3.7.0
|
||||
|
||||
- name: Sign ISO parts (keyless)
|
||||
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
|
||||
if: (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && github.server_url == 'https://github.com'
|
||||
run: |
|
||||
cd build/out
|
||||
for f in *.part-*; do
|
||||
|
|
@ -189,7 +189,7 @@ jobs:
|
|||
done
|
||||
|
||||
- name: Generate SBOM (SPDX)
|
||||
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
|
||||
if: (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && github.server_url == 'https://github.com'
|
||||
# Pinned to last v0.17 release that ships node20.
|
||||
uses: anchore/sbom-action@v0.17.2
|
||||
with:
|
||||
|
|
@ -198,7 +198,7 @@ jobs:
|
|||
output-file: build/out/veilor-os.spdx.json
|
||||
|
||||
- name: Build provenance attestation
|
||||
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
|
||||
if: (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && github.server_url == 'https://github.com'
|
||||
# Pinned to last v2.2 release that ships node20.
|
||||
uses: actions/attest-build-provenance@v2.2.3
|
||||
with:
|
||||
|
|
|
|||
Loading…
Reference in a new issue