Skip to content

gweinjc is testing Artifact download! #1

gweinjc is testing Artifact download!

gweinjc is testing Artifact download! #1

name: Download Artifact
run-name: ${{ github.actor }} is testing Artifact download!
on:
workflow_run:
workflows: ["Create Artifact"]
types:
- completed
jobs:
download_artifact:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- name: Download Artifact
run: |
WF_NAME="artifact-test-demo.yml"
ARTIFACT_NAME="artifact-test"
RUN_ID=`gh run --repo ${{ github.repository }} list --workflow ${WF_NAME} --json databaseId --jq .[0].databaseId`
gh run --repo ${{ github.repository }} download ${RUN_ID} -n ${ARTIFACT_NAME}
# List the artifiact directory/files
ls -lR
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}