File tree Expand file tree Collapse file tree 4 files changed +35
-2
lines changed Expand file tree Collapse file tree 4 files changed +35
-2
lines changed Original file line number Diff line number Diff line change 24
24
with :
25
25
inputs : action.yml action.py
26
26
release-signing-artifacts : true
27
+ bundle-only : true
Original file line number Diff line number Diff line change @@ -388,6 +388,29 @@ permissions:
388
388
release-signing-artifacts: true
389
389
` ` `
390
390
391
+ # ## `bundle-only`
392
+
393
+ **Default**: `false`
394
+
395
+ The `bundle-only` setting controls whether or not `sigstore-python` uploads `.crt`
396
+ or `.sig` artifacts.
397
+
398
+ This setting affects the behavior of the `upload-signing-artifacts` and `release-signing-artifacts`
399
+ settings. If neither of those settings are specified, this setting has no effect.
400
+
401
+ By default, `.crt` and `.sig` artifacts are uploaded. If enabled, only the `.sigstore`
402
+ signing artifact is uploaded.
403
+
404
+ Example :
405
+
406
+ ` ` ` yaml
407
+ - uses: sigstore/[email protected]
408
+ with:
409
+ inputs: file.txt
410
+ upload-signing-artifacts: true
411
+ bundle-only: true
412
+ ` ` `
413
+
391
414
# ## Internal options
392
415
<details>
393
416
<summary>⚠️ Internal options ⚠️</summary>
Original file line number Diff line number Diff line change @@ -188,6 +188,7 @@ def _fatal_help(msg):
188
188
signing_artifact_paths .append (artifact )
189
189
inputs .append (artifact )
190
190
191
+ bundle_only = os .getenv ("GHA_SIGSTORE_PYTHON_BUNDLE_ONLY" ) == "true"
191
192
for input_ in inputs :
192
193
# Forbid things that look like flags. This isn't a security boundary; just
193
194
# a way to prevent (less motivated) users from breaking the action on themselves.
@@ -199,9 +200,9 @@ def _fatal_help(msg):
199
200
for file_ in files :
200
201
if not file_ .is_file ():
201
202
_fatal_help (f"input { file_ } does not look like a file" )
202
- if "--certificate" not in sigstore_sign_args :
203
+ if not bundle_only and "--certificate" not in sigstore_sign_args :
203
204
signing_artifact_paths .append (f"{ file_ } .crt" )
204
- if "--signature" not in sigstore_sign_args :
205
+ if not bundle_only and "--signature" not in sigstore_sign_args :
205
206
signing_artifact_paths .append (f"{ file_ } .sig" )
206
207
if "--bundle" not in sigstore_sign_args :
207
208
signing_artifact_paths .append (f"{ file_ } .sigstore" )
Original file line number Diff line number Diff line change @@ -90,6 +90,13 @@ inputs:
90
90
description : " attach all signing artifacts as release assets"
91
91
required : false
92
92
default : false
93
+ bundle-only :
94
+ description : |
95
+ upload only the Sigstore bundle
96
+
97
+ has no effect if `upload-signing-artifacts` or `release-signing-artifacts` is not enabled
98
+ required : false
99
+ default : false
93
100
internal-be-careful-debug :
94
101
description : " run with debug logs (default false)"
95
102
required : false
@@ -124,6 +131,7 @@ runs:
124
131
GHA_SIGSTORE_PYTHON_VERIFY_CERT_IDENTITY : " ${{ inputs.verify-cert-identity }}"
125
132
GHA_SIGSTORE_PYTHON_VERIFY_OIDC_ISSUER : " ${{ inputs.verify-oidc-issuer }}"
126
133
GHA_SIGSTORE_PYTHON_RELEASE_SIGNING_ARTIFACTS : " ${{ inputs.release-signing-artifacts }}"
134
+ GHA_SIGSTORE_PYTHON_BUNDLE_ONLY : " ${{ inputs.bundle-only }}"
127
135
GHA_SIGSTORE_PYTHON_INTERNAL_BE_CAREFUL_DEBUG : " ${{ inputs.internal-be-careful-debug }}"
128
136
shell : bash
129
137
You can’t perform that action at this time.
0 commit comments