mirror of
https://github.com/actions/attest-build-provenance.git
synced 2025-12-15 20:03:28 +00:00
refactor action inputs (#14)
Signed-off-by: Brian DeHamer <bdehamer@github.com>
This commit is contained in:
parent
ee7eb81981
commit
fec1f1e733
14
action.yml
14
action.yml
@ -39,14 +39,8 @@ outputs:
|
|||||||
runs:
|
runs:
|
||||||
using: 'composite'
|
using: 'composite'
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/attest-build-provenance/generate-build-provenance-statement@main
|
- uses: actions/attest-build-provenance/generate-build-provenance-predicate@input-refactor
|
||||||
id: generate-build-provenance-statement
|
id: generate-build-provenance-predicate
|
||||||
with:
|
|
||||||
github-token: ${{ inputs.github-token }}
|
|
||||||
subject-path: ${{ inputs.subject-path }}
|
|
||||||
subject-digest: ${{ inputs.subject-digest }}
|
|
||||||
subject-name: ${{ inputs.subject-name }}
|
|
||||||
push-to-registry: ${{ inputs.push-to-registry }}
|
|
||||||
- uses: actions/attest@main
|
- uses: actions/attest@main
|
||||||
id: attest
|
id: attest
|
||||||
with:
|
with:
|
||||||
@ -55,5 +49,5 @@ runs:
|
|||||||
subject-digest: ${{ inputs.subject-digest }}
|
subject-digest: ${{ inputs.subject-digest }}
|
||||||
subject-name: ${{ inputs.subject-name }}
|
subject-name: ${{ inputs.subject-name }}
|
||||||
push-to-registry: ${{ inputs.push-to-registry }}
|
push-to-registry: ${{ inputs.push-to-registry }}
|
||||||
predicate-type: ${{ steps.generate-build-provenance-statement.outputs.predicate-type }}
|
predicate-type: ${{ steps.generate-build-provenance-predicate.outputs.predicate-type }}
|
||||||
predicate: ${{ steps.generate-build-provenance-statement.outputs.predicate }}
|
predicate: ${{ steps.generate-build-provenance-predicate.outputs.predicate }}
|
||||||
|
|||||||
14
generate-build-provenance-predicate/action.yml
Normal file
14
generate-build-provenance-predicate/action.yml
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
name: 'Generate Build Provenance Statement'
|
||||||
|
description: 'Generate provenance statement for build artifacts'
|
||||||
|
author: 'GitHub'
|
||||||
|
|
||||||
|
outputs:
|
||||||
|
predicate:
|
||||||
|
description: >
|
||||||
|
The JSON-serialized of the attestation predicate.
|
||||||
|
predicate-type:
|
||||||
|
description: >
|
||||||
|
URI identifying the type of the predicate.
|
||||||
|
runs:
|
||||||
|
using: node20
|
||||||
|
main: ../dist/index.js
|
||||||
@ -1,43 +0,0 @@
|
|||||||
name: 'Generate Build Provenance Statement'
|
|
||||||
description: 'Generate provenance statement for build artifacts'
|
|
||||||
author: 'GitHub'
|
|
||||||
|
|
||||||
inputs:
|
|
||||||
github-token:
|
|
||||||
description: >
|
|
||||||
The GitHub token used to make authenticated API requests.
|
|
||||||
default: ${{ github.token }}
|
|
||||||
required: false
|
|
||||||
subject-path:
|
|
||||||
description: >
|
|
||||||
Path to the artifact for which provenance will be generated. Must specify
|
|
||||||
exactly one of "subject-path" or "subject-digest".
|
|
||||||
required: false
|
|
||||||
subject-digest:
|
|
||||||
description: >
|
|
||||||
Digest of the subject for which provenance will be generated. Must be in
|
|
||||||
the form "algorithm:hex_digest" (e.g. "sha256:abc123..."). Must specify
|
|
||||||
exactly one of "subject-path" or "subject-digest".
|
|
||||||
required: false
|
|
||||||
subject-name:
|
|
||||||
description: >
|
|
||||||
Subject name as it should appear in the provenance statement. Required
|
|
||||||
unless "subject-path" is specified, in which case it will be inferred from
|
|
||||||
the path.
|
|
||||||
push-to-registry:
|
|
||||||
description: >
|
|
||||||
Whether to push the provenance statement to the image registry. Requires
|
|
||||||
that the "subject-name" parameter specify the fully-qualified image name
|
|
||||||
and that the "subject-digest" parameter be specified. Defaults to false.
|
|
||||||
default: false
|
|
||||||
required: false
|
|
||||||
outputs:
|
|
||||||
predicate:
|
|
||||||
description: >
|
|
||||||
The JSON-serialized of the attestation predicate.
|
|
||||||
predicate-type:
|
|
||||||
description: >
|
|
||||||
URI identifying the type of the predicate.
|
|
||||||
runs:
|
|
||||||
using: node20
|
|
||||||
main: ../dist/index.js
|
|
||||||
Loading…
Reference in New Issue
Block a user