-
Notifications
You must be signed in to change notification settings - Fork 122
Description
Feature Request: I would like to have support github attestations during the host phase with ability to filter on what the subjects should be. See example working workflow astral-sh/uv#11357
Problem: Even though there's support already for github attestations via github-attestations = true, it only works when build-local-artifacts is used, which is not the case in the above scenario/workflow. In addition it would be desirable to be able to configure what gets attested and becomes part of the subject versus what does not, as shown in the above workflow.
Proposal:
-
Support
actions/attest-build-provenance@v2onhostphase. This could be introduced by adding agithub_attestations_phaseconfiguration variable that takes eitherhostorbuild-local-artifacts, defaulting tobuild-local-artifactsfor backwards compatibility and modifyingpublish_github.yml.j2to support it. -
Support filters for attestations in host phase. This could also be done by adding a
github_attestations_filtersconfiguration variable that is an array of strings that will be passed down tosubject-pathinattest-build-provenancein thehostphase. This can default toNonefor backwards compatibility. For example, in case ofbuild-local-artifactsit should result in the currenttarget/distrib/*${{ join(matrix.targets, ', ') }}*", but when used withhostit will result inartifacts/*by default or when adding more filters['*.json', '*.sh', '*.ps1', '*.zip', '*.tar.gz']it would work for example as shown below.- name: Generate artifact attestations uses: actions/attest-build-provenance@v2 with: subject-path: | artifacts/*.json artifacts/*.sh artifacts/*.ps1 artifacts/*.zip artifacts/*.tar.gz
I'd appreciate any thoughts/guidance here if this is achievable or something you'd be happy to support from an external contribution 😄