File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -219,21 +219,29 @@ To take advantage of this immutability for security purposes (to avoid potential
219
219
jobs:
220
220
upload:
221
221
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
+
222
227
steps:
223
228
- name: Create a file
224
229
run: echo "hello world" > my-file.txt
225
230
- name: Upload Artifact
226
- id: upload
231
+ id: upload-step
227
232
uses: actions/upload-artifact@v4
228
233
with:
229
234
name: my-artifact
230
235
path: my-file.txt
231
236
# The upload step outputs the artifact ID
232
237
- 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
+
234
240
download:
235
241
needs: upload
242
+
236
243
runs-on: ubuntu-latest
244
+
237
245
steps:
238
246
- name: Download Artifact by ID
239
247
uses: actions/download-artifact@v4
You can’t perform that action at this time.
0 commit comments