From b649cc222964c2c0d73582c8073d7e762217fc48 Mon Sep 17 00:00:00 2001 From: Geoffrey Wein <89030113+gweinjc@users.noreply.github.com> Date: Thu, 2 Nov 2023 09:35:11 -0600 Subject: [PATCH] Create artifact-download-demo.yml --- .github/workflows/artifact-download-demo.yml | 23 ++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/artifact-download-demo.yml diff --git a/.github/workflows/artifact-download-demo.yml b/.github/workflows/artifact-download-demo.yml new file mode 100644 index 000000000..4a7d55097 --- /dev/null +++ b/.github/workflows/artifact-download-demo.yml @@ -0,0 +1,23 @@ +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 }}