Open webknjaz opened 3 days ago
Yep, this should be straightforward to do -- the attestation will either need to be uploaded to GH before it's munged into the PEP 740 shape, or re-munged back into a Sigstore bundle for subsequent uploading.
One note: putting things in GH's attestations store also requires attestations: write
, which is why I didn't look too closely at it initially for this action -- I didn't want to widen things beyond id-token: write
, since that would be painful for users to upgrade to. However, it may be worth it (or something we can feature-test).
I haven't found a way to feature-test. So it'd probably be an upload attempt with error suppression...
I haven't found a way to feature-test. So it'd probably be an upload attempt with error suppression...
Makes sense to me :slightly_smiling_face:
@woodruffw it might be a good idea to also explore exposing the signatures to the end-users (maybe, via action outputs?). As in, beyond telling them to scan the dist/
folder for those files. This would let them upload a copy to GH Releases if they want to.
Yeah, that's a good idea -- I haven't been 100% sure how to do it since it's a one-many relationship in theory (one dist, potentially multiple attestations), so action outputs become a little hacky. I'll think about that some more.
This is how the official action does this: https://github.com/actions/toolkit/blob/77f247b/packages/attest/src/store.ts#L5-L44.
This is the API endpoint doc: https://docs.github.com/en/rest/repos/repos?apiVersion=2022-11-28#create-an-attestation.