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 b2431a3
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 1 deletion.
44 changes: 44 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: "Test downloading artifacts"

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/expired_domains_image:latest
steps:
- uses: actions/checkout@v4
- run: npm install @actions/artifact
- uses: actions/github-script@v6
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, "./expired-d", { createArtifactFolder: false })
}
- run: |
ls -l ./expired-d
2 changes: 1 addition & 1 deletion Dockerfile_ED
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ FROM ubuntu:latest
# make Apt non-interactive
ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update && apt-get install -y git openssh-client ca-certificates wget tzdata whois language-pack-pl curl python3-tldextract nodejs python3-dnspython python3-aiohttp
RUN apt-get update && apt-get install -y git openssh-client ca-certificates wget tzdata whois language-pack-pl curl python3-tldextract nodejs python3-dnspython python3-aiohttp npm

# uncomment chosen locale to enable it's generation
RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen
Expand Down

0 comments on commit b2431a3

Please sign in to comment.