mirror of
https://github.com/actions/download-artifact.git
synced 2025-08-21 08:00:18 +00:00
Merge 1b2090ecbd789cf272fa228dd94d63485dd6b42f into d0ce8fd1167ed839810201de977912a090ab10a7
This commit is contained in:
commit
dab5fe83be
19
README.md
19
README.md
@ -86,6 +86,7 @@ For assistance with breaking changes, see [MIGRATION.md](docs/MIGRATION.md).
|
|||||||
|
|
||||||
# The id of the workflow run where the desired download artifact was uploaded from.
|
# The id of the workflow run where the desired download artifact was uploaded from.
|
||||||
# If github-token is specified, this is the run that artifacts will be downloaded from.
|
# If github-token is specified, this is the run that artifacts will be downloaded from.
|
||||||
|
# If your current workflow runs after another (triggered by `workflow_run`), you can specify the `run-id` to `${{ github.event.workflow_run.id }}`
|
||||||
# Optional. Default is ${{ github.run_id }}
|
# Optional. Default is ${{ github.run_id }}
|
||||||
run-id:
|
run-id:
|
||||||
```
|
```
|
||||||
@ -233,6 +234,24 @@ steps:
|
|||||||
run-id: 1234
|
run-id: 1234
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Also, a common use case is to download artifacts from the previously completed workflow, then you can specify the `run-id` to `${{GitHub.event.workflow_run.id }}`:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
on:
|
||||||
|
workflow_run:
|
||||||
|
workflows: [ "The name of the previous workflow" ]
|
||||||
|
types:
|
||||||
|
- completed
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: my-other-artifact
|
||||||
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
repository: actions/toolkit
|
||||||
|
run-id: ${{ github.event.workflow_run.id }}
|
||||||
|
```
|
||||||
|
|
||||||
## Limitations
|
## Limitations
|
||||||
|
|
||||||
### Permission Loss
|
### Permission Loss
|
||||||
|
Loading…
x
Reference in New Issue
Block a user