You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+19-1Lines changed: 19 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,7 @@ See also [upload-artifact](https://github.com/actions/upload-artifact).
8
8
-[v4 - What's new](#v4---whats-new)
9
9
-[Improvements](#improvements)
10
10
-[Breaking Changes](#breaking-changes)
11
+
-[Note](#note)
11
12
-[Usage](#usage)
12
13
-[Inputs](#inputs)
13
14
-[Outputs](#outputs)
@@ -89,6 +90,7 @@ You are welcome to still raise bugs in this repo.
89
90
# When multiple artifacts are matched, this changes the behavior of the destination directories.
90
91
# If true, the downloaded artifacts will be in the same directory specified by path.
91
92
# If false, the downloaded artifacts will be extracted into individual named directories within the specified path.
93
+
# Note: When downloading a single artifact (by name or ID), it will always be extracted directly to the specified path.
92
94
# Optional. Default is 'false'
93
95
merge-multiple:
94
96
@@ -145,6 +147,8 @@ steps:
145
147
146
148
The `artifact-ids` input allows downloading artifacts using their unique ID rather than name. This is particularly useful when working with immutable artifacts from `actions/upload-artifact@v4` which assigns a unique ID to each artifact.
147
149
150
+
Download a single artifact by ID to the current working directory (`$GITHUB_WORKSPACE`):
151
+
148
152
```yaml
149
153
steps:
150
154
- uses: actions/download-artifact@v4
@@ -154,6 +158,20 @@ steps:
154
158
run: ls -R
155
159
```
156
160
161
+
Download a single artifact by ID to a specific directory:
162
+
163
+
```yaml
164
+
steps:
165
+
- uses: actions/download-artifact@v4
166
+
with:
167
+
artifact-ids: 12345
168
+
path: your/destination/dir
169
+
- name: Display structure of downloaded files
170
+
run: ls -R your/destination/dir
171
+
```
172
+
173
+
When downloading a single artifact by ID, the behavior is identical to downloading by name - the artifact contents are extracted directly to the specified path without creating a subdirectory.
174
+
157
175
Multiple artifacts can be downloaded by providing a comma-separated list of IDs:
158
176
159
177
```yaml
@@ -166,7 +184,7 @@ steps:
166
184
run: ls -R path/to/artifacts
167
185
```
168
186
169
-
This will download multiple artifacts to separate directories (similar to downloading multiple artifacts by name).
187
+
When downloading multiple artifacts by ID, each artifact will be extracted into its own subdirectory named after the artifact (similar to downloading multiple artifacts by name).
0 commit comments