Skip to content

Commit

Permalink
Test downloading multiple artifacts at 1 step
Browse files Browse the repository at this point in the history
  • Loading branch information
hawkeye116477 committed Sep 8, 2023
1 parent ba0b392 commit e0a9ea1
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: "Test dawidd6's download-artifact action"

on:
workflow_dispatch:

jobs:
generate-artifacts:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: |
git config --global --add safe.directory "$GITHUB_WORKSPACE"
cd "$GITHUB_WORKSPACE"
mkdir ./expired-d
touch ./expired-d/test-1.txt
touch ./expired-d/test-2.txt
- uses: actions/upload-artifact@v3
with:
name: E_TEST_01
path: |
expired-d/test-1.txt
- uses: actions/upload-artifact@v3
with:
name: E_TEST_02
path: |
expired-d/test-2.txt
download-artifacts:
needs: generate-artifacts
runs-on: ubuntu-latest
container: ghcr.io/filtersheroes/rtm_image:latest
steps:
- uses: actions/checkout@v4
- uses: actions/github-script@6
with:
script: |
const artifact = require("@actions/artifact")
const artifactClient = artifact.create()
const artifactFiles = ["E_TEST_01", "E_TEST_02"]
for (artifactFile of artifactFiles) {
await artifactClient.downloadArtifact(artifactFile, { createArtifactFolder: false })
}
- run: |
ls -l ./expired-d

0 comments on commit e0a9ea1

Please sign in to comment.