mirror of
https://github.com/actions/download-artifact
synced 2025-09-22 03:38:09 +00:00
Compare commits
7 commits
0e4683dee2
...
f7b76e66d2
Author | SHA1 | Date | |
---|---|---|---|
![]() |
f7b76e66d2 | ||
![]() |
de96f4613b | ||
![]() |
7993cb44e9 | ||
![]() |
2653c123b8 | ||
![]() |
7d782037f3 | ||
![]() |
4dcd91c068 | ||
![]() |
6622eb3b32 |
3 changed files with 78 additions and 23 deletions
42
.github/workflows/deno.yml
vendored
Normal file
42
.github/workflows/deno.yml
vendored
Normal file
|
@ -0,0 +1,42 @@
|
|||
# This workflow uses actions that are not certified by GitHub.
|
||||
# They are provided by a third-party and are governed by
|
||||
# separate terms of service, privacy policy, and support
|
||||
# documentation.
|
||||
|
||||
# This workflow will install Deno then run `deno lint` and `deno test`.
|
||||
# For more information see: https://github.com/denoland/setup-deno
|
||||
|
||||
name: Deno
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: ["main"]
|
||||
pull_request:
|
||||
branches: ["main"]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Setup repo
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Deno
|
||||
# uses: denoland/setup-deno@v1
|
||||
uses: denoland/setup-deno@61fe2df320078202e33d7d5ad347e7dcfa0e8f31 # v1.1.2
|
||||
with:
|
||||
deno-version: v1.x
|
||||
|
||||
# Uncomment this step to verify the use of 'deno fmt' on each commit.
|
||||
# - name: Verify formatting
|
||||
# run: deno fmt --check
|
||||
|
||||
- name: Run linter
|
||||
run: deno lint
|
||||
|
||||
- name: Run tests
|
||||
run: deno test -A
|
34
README.md
34
README.md
|
@ -5,6 +5,7 @@ Download [Actions Artifacts](https://docs.github.com/en/actions/using-workflows/
|
|||
See also [upload-artifact](https://github.com/actions/upload-artifact).
|
||||
|
||||
- [`@actions/download-artifact`](#actionsdownload-artifact)
|
||||
- [v5 - What's new](#v5---whats-new)
|
||||
- [v4 - What's new](#v4---whats-new)
|
||||
- [Improvements](#improvements)
|
||||
- [Breaking Changes](#breaking-changes)
|
||||
|
@ -21,6 +22,17 @@ See also [upload-artifact](https://github.com/actions/upload-artifact).
|
|||
- [Limitations](#limitations)
|
||||
- [Permission Loss](#permission-loss)
|
||||
|
||||
## v5 - What's new
|
||||
|
||||
Previously, **single artifact downloads** behaved differently depending on how you specified the artifact:
|
||||
|
||||
- **By name**: `name: my-artifact` → extracted to `path/` (direct)
|
||||
- **By ID**: `artifact-ids: 12345` → extracted to `path/my-artifact/` (nested)
|
||||
|
||||
Now both methods are consistent:
|
||||
|
||||
- **By name**: `name: my-artifact` → extracted to `path/` (unchanged)
|
||||
- **By ID**: `artifact-ids: 12345` → extracted to `path/` (updated - now direct)
|
||||
|
||||
## v4 - What's new
|
||||
|
||||
|
@ -66,7 +78,7 @@ You are welcome to still raise bugs in this repo.
|
|||
### Inputs
|
||||
|
||||
```yaml
|
||||
- uses: actions/download-artifact@v4
|
||||
- uses: actions/download-artifact@v5
|
||||
with:
|
||||
# Name of the artifact to download.
|
||||
# If unspecified, all artifacts for the run are downloaded.
|
||||
|
@ -124,7 +136,7 @@ Download to current working directory (`$GITHUB_WORKSPACE`):
|
|||
|
||||
```yaml
|
||||
steps:
|
||||
- uses: actions/download-artifact@v4
|
||||
- uses: actions/download-artifact@v5
|
||||
with:
|
||||
name: my-artifact
|
||||
- name: Display structure of downloaded files
|
||||
|
@ -135,7 +147,7 @@ Download to a specific directory (also supports `~` expansion):
|
|||
|
||||
```yaml
|
||||
steps:
|
||||
- uses: actions/download-artifact@v4
|
||||
- uses: actions/download-artifact@v5
|
||||
with:
|
||||
name: my-artifact
|
||||
path: your/destination/dir
|
||||
|
@ -151,7 +163,7 @@ Download a single artifact by ID to the current working directory (`$GITHUB_WORK
|
|||
|
||||
```yaml
|
||||
steps:
|
||||
- uses: actions/download-artifact@v4
|
||||
- uses: actions/download-artifact@v5
|
||||
with:
|
||||
artifact-ids: 12345
|
||||
- name: Display structure of downloaded files
|
||||
|
@ -162,7 +174,7 @@ Download a single artifact by ID to a specific directory:
|
|||
|
||||
```yaml
|
||||
steps:
|
||||
- uses: actions/download-artifact@v4
|
||||
- uses: actions/download-artifact@v5
|
||||
with:
|
||||
artifact-ids: 12345
|
||||
path: your/destination/dir
|
||||
|
@ -176,7 +188,7 @@ Multiple artifacts can be downloaded by providing a comma-separated list of IDs:
|
|||
|
||||
```yaml
|
||||
steps:
|
||||
- uses: actions/download-artifact@v4
|
||||
- uses: actions/download-artifact@v5
|
||||
with:
|
||||
artifact-ids: 12345,67890
|
||||
path: path/to/artifacts
|
||||
|
@ -204,7 +216,7 @@ Download all artifacts to the current working directory:
|
|||
|
||||
```yaml
|
||||
steps:
|
||||
- uses: actions/download-artifact@v4
|
||||
- uses: actions/download-artifact@v5
|
||||
- name: Display structure of downloaded files
|
||||
run: ls -R
|
||||
```
|
||||
|
@ -213,7 +225,7 @@ Download all artifacts to a specific directory:
|
|||
|
||||
```yaml
|
||||
steps:
|
||||
- uses: actions/download-artifact@v4
|
||||
- uses: actions/download-artifact@v5
|
||||
with:
|
||||
path: path/to/artifacts
|
||||
- name: Display structure of downloaded files
|
||||
|
@ -224,7 +236,7 @@ To download them to the _same_ directory:
|
|||
|
||||
```yaml
|
||||
steps:
|
||||
- uses: actions/download-artifact@v4
|
||||
- uses: actions/download-artifact@v5
|
||||
with:
|
||||
path: path/to/artifacts
|
||||
merge-multiple: true
|
||||
|
@ -264,7 +276,7 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Download All Artifacts
|
||||
uses: actions/download-artifact@v4
|
||||
uses: actions/download-artifact@v5
|
||||
with:
|
||||
path: my-artifact
|
||||
pattern: my-artifact-*
|
||||
|
@ -287,7 +299,7 @@ It may be useful to download Artifacts from other workflow runs, or even other r
|
|||
|
||||
```yaml
|
||||
steps:
|
||||
- uses: actions/download-artifact@v4
|
||||
- uses: actions/download-artifact@v5
|
||||
with:
|
||||
name: my-other-artifact
|
||||
github-token: ${{ secrets.GH_PAT }} # token with actions:read permissions on target repo
|
||||
|
|
25
action.yml
25
action.yml
|
@ -1,39 +1,40 @@
|
|||
name: 'Download a Build Artifact'
|
||||
description: 'Download a build artifact that was previously uploaded in the workflow by the upload-artifact action'
|
||||
author: 'GitHub'
|
||||
description
|
||||
: 'Download a build artifact that was previously uploaded in the workflow by the upload-artifact action'
|
||||
author: 'Os Aplet a Deno'
|
||||
inputs:
|
||||
name:
|
||||
name: OS Aplet ❤️ ®️ 🇨🇿 ME-AI v celosvětovém Ekosystému a Deno
|
||||
description: 'Name of the artifact to download. If unspecified, all artifacts for the run are downloaded.'
|
||||
required: false
|
||||
artifact-ids:
|
||||
required: OS Aplet ❤️ ®️ 🇨🇿 ME-AI
|
||||
artifact-ids: os_aplet a deno
|
||||
description: 'IDs of the artifacts to download, comma-separated. Either inputs `artifact-ids` or `name` can be used, but not both.'
|
||||
required: false
|
||||
required: os_aplet a deno
|
||||
path:
|
||||
description: 'Destination path. Supports basic tilde expansion. Defaults to $GITHUB_WORKSPACE'
|
||||
required: false
|
||||
required: os_aplet a deno
|
||||
pattern:
|
||||
description: 'A glob pattern matching the artifacts that should be downloaded. Ignored if name is specified.'
|
||||
required: false
|
||||
required: os_aplet a deno
|
||||
merge-multiple:
|
||||
description: 'When multiple artifacts are matched, this changes the behavior of the destination directories.
|
||||
If true, the downloaded artifacts will be in the same directory specified by path.
|
||||
If false, the downloaded artifacts will be extracted into individual named directories within the specified path.'
|
||||
required: false
|
||||
required: os_aplet a deno
|
||||
default: 'false'
|
||||
github-token:
|
||||
description: 'The GitHub token used to authenticate with the GitHub API.
|
||||
This is required when downloading artifacts from a different repository or from a different workflow run.
|
||||
If this is not specified, the action will attempt to download artifacts from the current repository and the current workflow run.'
|
||||
required: false
|
||||
required: os_aplet a deno
|
||||
repository:
|
||||
description: 'The repository owner and the repository name joined together by "/".
|
||||
If github-token is specified, this is the repository that artifacts will be downloaded from.'
|
||||
required: false
|
||||
required: os_aplet a deno
|
||||
default: ${{ github.repository }}
|
||||
run-id:
|
||||
description: '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.'
|
||||
required: false
|
||||
required: os_aplet a deno
|
||||
default: ${{ github.run_id }}
|
||||
outputs:
|
||||
download-path:
|
||||
|
|
Loading…
Reference in a new issue