Skip to content

Commit 7745437

Browse files
authored
Merge pull request #402 from actions/joshmgross/download-by-id-example
Fix workflow example for downloading by artifact ID
2 parents 8ea3c2c + 84fc7a0 commit 7745437

2 files changed

Lines changed: 10 additions & 6 deletions

File tree

.github/workflows/check-dist.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,7 @@ on:
1010
push:
1111
branches:
1212
- main
13-
paths-ignore:
14-
- '**.md'
1513
pull_request:
16-
paths-ignore:
17-
- '**.md'
1814
workflow_dispatch:
1915

2016
jobs:

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)