actions / attest

Action for generating attestations for workflow artifacts
MIT License
33 stars 6 forks source link

Docs suggestion: Clarify use with release tags #50

Closed udf2457 closed 6 months ago

udf2457 commented 6 months ago

Thank you for your work on this.

It is not clear how to use the input to define a tagged release.

For example, assume my github action fires on commit of a new tag to create a new release with assets named inline with the tag number e.g. foo_$tagNumber_darwin_amd64.tar.gz.

Its not quite clear, at least to me, how to integrate attest with this sort of dynamic naming.

bdehamer commented 6 months ago

When specifying the value for the subject-path input parameter you can use any sort of GitHub Action-supported expression. If the name of the tag is present in an environment variable you could do something like:

- uses: actions/attest-build-provenance@v1
  with:
    subject-path: foo_${{ env.tagNumber }}_darwin_amd64.tar.gz

or maybe you have the entire name of the asset set as the output value of a previous step:

- uses: actions/attest-build-provenance@v1
  with:
    subject-path: ${{ steps.build.outputs.asset_name }}
udf2457 commented 6 months ago

Super, thanks @bdehamer , will test at some point int he next few days