Skip to content

Commit b27c0e2

Browse files
committed
Use environment-variable substitution in GHA workflows
1 parent 5e91ae5 commit b27c0e2

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

.github/workflows/create-release.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,15 @@ jobs:
6464
show-summary: "true"
6565

6666
- name: Convert attestations to PEP 740
67-
# workflow_ref example: sphinx-doc/sphinx/.github/workflows/create-release.yml@refs/heads/master
6867
run: >
6968
python utils/convert_attestations.py
70-
"${{ steps.attest.outputs.bundle-path }}"
71-
"https://github.com/${{ github.workflow_ref }}"
69+
"$BUNDLE_PATH"
70+
"$SIGNER_IDENTITY"
71+
env:
72+
BUNDLE_PATH: "${{ steps.attest.outputs.bundle-path }}"
73+
# workflow_ref example: sphinx-doc/sphinx/.github/workflows/create-release.yml@refs/heads/master
74+
# this forms the "signer identity" for the attestations
75+
SIGNER_IDENTITY: "https://github.com/${{ github.workflow_ref }}"
7276

7377
- name: Inspect PEP 740 attestations
7478
run: |
@@ -77,8 +81,10 @@ jobs:
7781
- name: Prepare attestation bundles for uploading
7882
run: |
7983
mkdir -p /tmp/attestation-bundles
80-
cp "${{ steps.attest.outputs.bundle-path }}" /tmp/attestation-bundles/
84+
cp "$BUNDLE_PATH" /tmp/attestation-bundles/
8185
cp dist/*.publish.attestation /tmp/attestation-bundles/
86+
env:
87+
BUNDLE_PATH: "${{ steps.attest.outputs.bundle-path }}"
8288

8389
- name: Upload attestation bundles
8490
uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)