mirror of
https://github.com/actions/download-artifact
synced 2025-09-22 03:38:09 +00:00
Compare commits
8 commits
c142b3954f
...
30100c425d
Author | SHA1 | Date | |
---|---|---|---|
![]() |
30100c425d | ||
![]() |
de96f4613b | ||
![]() |
7993cb44e9 | ||
![]() |
2653c123b8 | ||
![]() |
7d782037f3 | ||
![]() |
45e33e9cb3 | ||
![]() |
7bbf96ca8d | ||
![]() |
28b76fc37c |
3 changed files with 97 additions and 11 deletions
38
.github/workflows/datadog-synthetics.yml
vendored
Normal file
38
.github/workflows/datadog-synthetics.yml
vendored
Normal file
|
@ -0,0 +1,38 @@
|
|||
# This workflow will trigger Datadog Synthetic tests within your Datadog organisation
|
||||
# For more information on running Synthetic tests within your GitHub workflows see: https://docs.datadoghq.com/synthetics/cicd_integrations/github_actions/
|
||||
|
||||
# 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.
|
||||
|
||||
# To get started:
|
||||
|
||||
# 1. Add your Datadog API (DD_API_KEY) and Application Key (DD_APP_KEY) as secrets to your GitHub repository. For more information, see: https://docs.datadoghq.com/account_management/api-app-keys/.
|
||||
# 2. Start using the action within your workflow
|
||||
|
||||
name: Run Datadog Synthetic tests
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
pull_request:
|
||||
branches: [ "main" ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
# Run Synthetic tests within your GitHub workflow.
|
||||
# For additional configuration options visit the action within the marketplace: https://github.com/marketplace/actions/datadog-synthetics-ci
|
||||
- name: Run Datadog Synthetic tests
|
||||
uses: DataDog/synthetics-ci-github-action@87b505388a22005bb8013481e3f73a367b9a53eb # v1.4.0
|
||||
with:
|
||||
api_key: ${{secrets.DD_API_KEY}}
|
||||
app_key: ${{secrets.DD_APP_KEY}}
|
||||
test_search_query: 'tag:e2e-tests' #Modify this tag to suit your tagging strategy
|
||||
|
||||
|
36
.github/workflows/npm-publish-github-packages.yml
vendored
Normal file
36
.github/workflows/npm-publish-github-packages.yml
vendored
Normal file
|
@ -0,0 +1,36 @@
|
|||
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
|
||||
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
|
||||
|
||||
name: Node.js Package
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [created]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20
|
||||
- run: npm ci
|
||||
- run: npm test
|
||||
|
||||
publish-gpr:
|
||||
needs: build
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20
|
||||
registry-url: https://npm.pkg.github.com/
|
||||
- run: npm ci
|
||||
- run: npm publish
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
|
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
|
||||
|
|
Loading…
Reference in a new issue