Compare commits

...

1 Commits

Author SHA1 Message Date
Brian DeHamer 60a047b675 oci compat mode input arg
Signed-off-by: Brian DeHamer <bdehamer@github.com>
2025-04-10 10:34:46 -07:00
3 changed files with 8 additions and 1 deletions
+2
View File
@@ -17,6 +17,7 @@ export const createAttestation = async (
sigstoreInstance: SigstoreInstance sigstoreInstance: SigstoreInstance
pushToRegistry: boolean pushToRegistry: boolean
githubToken: string githubToken: string
ociCompatMode: boolean
} }
): Promise<AttestResult> => { ): Promise<AttestResult> => {
// Sign provenance w/ Sigstore // Sign provenance w/ Sigstore
@@ -43,6 +44,7 @@ export const createAttestation = async (
'dev.sigstore.bundle.content': 'dsse-envelope', 'dev.sigstore.bundle.content': 'dsse-envelope',
'dev.sigstore.bundle.predicateType': predicate.type 'dev.sigstore.bundle.predicateType': predicate.type
}, },
compatibility: opts.ociCompatMode,
fetchOpts: { timeout: OCI_TIMEOUT, retry: OCI_RETRY } fetchOpts: { timeout: OCI_TIMEOUT, retry: OCI_RETRY }
}) })
+3
View File
@@ -18,6 +18,9 @@ const inputs: RunInputs = {
// undocumented -- not part of public interface // undocumented -- not part of public interface
privateSigning: ['true', 'True', 'TRUE', '1'].includes( privateSigning: ['true', 'True', 'TRUE', '1'].includes(
core.getInput('private-signing') core.getInput('private-signing')
),
ociCompatMode: ['true', 'True', 'TRUE', '1'].includes(
core.getInput('oci-compatibility-mode')
) )
} }
+3 -1
View File
@@ -23,6 +23,7 @@ export type RunInputs = SubjectInputs &
githubToken: string githubToken: string
showSummary: boolean showSummary: boolean
privateSigning: boolean privateSigning: boolean
ociCompatMode: boolean
} }
/* istanbul ignore next */ /* istanbul ignore next */
@@ -68,7 +69,8 @@ export async function run(inputs: RunInputs): Promise<void> {
const att = await createAttestation(subjects, predicate, { const att = await createAttestation(subjects, predicate, {
sigstoreInstance, sigstoreInstance,
pushToRegistry: inputs.pushToRegistry, pushToRegistry: inputs.pushToRegistry,
githubToken: inputs.githubToken githubToken: inputs.githubToken,
ociCompatMode: inputs.ociCompatMode
}) })
logAttestation(subjects, att, sigstoreInstance) logAttestation(subjects, att, sigstoreInstance)