Skip to content

Commit 67f2bc3

Browse files
committed
Fix workflow example for downloading by artifact ID
1 parent 8ea3c2c commit 67f2bc3

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

docs/MIGRATION.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,21 +219,29 @@ To take advantage of this immutability for security purposes (to avoid potential
219219
jobs:
220220
upload:
221221
runs-on: ubuntu-latest
222+
223+
# Make the artifact ID available to the download job
224+
outputs:
225+
artifact-id: ${{ steps.upload-step.outputs.artifact-id }}
226+
222227
steps:
223228
- name: Create a file
224229
run: echo "hello world" > my-file.txt
225230
- name: Upload Artifact
226-
id: upload
231+
id: upload-step
227232
uses: actions/upload-artifact@v4
228233
with:
229234
name: my-artifact
230235
path: my-file.txt
231236
# The upload step outputs the artifact ID
232237
- name: Print Artifact ID
233-
run: echo "Artifact ID is ${{ steps.upload.outputs.artifact-id }}"
238+
run: echo "Artifact ID is ${{ steps.upload-step.outputs.artifact-id }}"
239+
234240
download:
235241
needs: upload
242+
236243
runs-on: ubuntu-latest
244+
237245
steps:
238246
- name: Download Artifact by ID
239247
uses: actions/download-artifact@v4

0 commit comments

Comments
 (0)