File tree Expand file tree Collapse file tree 2 files changed +54
-0
lines changed
actions/nodejs/secure-attestations-download Expand file tree Collapse file tree 2 files changed +54
-0
lines changed Original file line number Diff line number Diff line change 1+ # secure-attestations-download
2+
3+ The ` actions/nodejs/secure-attestations-download ` action provides a way to
4+ download attestations generated by the [ Node.js
5+ builder] ( ../../../internal/builders/nodejs/README.md ) . The attestation can then
6+ be used to publish the package or upload to a secondary storage.
7+
8+ ## Example
9+
10+ ``` yaml
11+ jobs :
12+ build :
13+ permissions :
14+ id-token : write
15+ contents : read
16+ actions : read
17+ if : startsWith(github.ref, 'refs/tags/')
18+ uses :
slsa-framework/slsa-github-generator/.github/workflows/[email protected] 19+ with :
20+ run-scripts : " ci, build"
21+
22+ download :
23+ needs : [build]
24+ runs-on : ubuntu-latest
25+ steps :
26+ - name : Download provenance
27+ uses :
slsa-framework/slsa-github-generator/actions/nodejs/[email protected] 28+ with :
29+ name : ${{ needs.build.outputs.provenance-download-name }}
30+ path : " attestations"
31+ sha256 : ${{ needs.build.outputs.provenance-download-sha256 }}
32+ ` ` `
33+
34+ This will download the attestation file to
35+ ` <GITHUB_WORKSPACE>/attestations/<artifact name>/`.
36+
37+ See [Custom Publishing](../../../internal/builders/nodejs/README.md#custom-publishing) for
38+ a full example of publishing using a custom tool.
39+
40+ # # Inputs
41+
42+ | Name | Required | Default | Description |
43+ | -------- | -------- | ------- | -------------------------------------------------------------------------------------------------------------------- |
44+ | `name` | yes | | The GitHub Actions workflow run artifact name. Note that this is a name given to an upload, not the path or filename |
45+ | `path` | no | "." | The path to download the attestations into. Must be under the `GITHUB_WORKSPACE` |
46+ | `sha256` | yes | | The SHA256 of the artifact for verification |
47+
48+ # # Outputs
49+
50+ There are no outputs.
Original file line number Diff line number Diff line change @@ -218,6 +218,10 @@ jobs:
218218You will need a package management tool that supports providing the provenance
219219file. Currently [npm], [lerna] or [pnpm] can support this.
220220
221+ See the full documentation for the
222+ [`secure-attestations-download` action](../../../actions/nodejs/secure-attestations-download/README.md)
223+ for more information.
224+
221225# ## Referencing the Node.js builder
222226
223227At present, the builder **MUST** be referenced by a tag of the form `@vX.Y.Z`,
You can’t perform that action at this time.
0 commit comments