Skip to content

Commit

Permalink
Create artifact-download-demo.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
gweinjc authored Nov 2, 2023
1 parent 5898cd0 commit b649cc2
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/artifact-download-demo.yml
Original file line number Diff line number Diff line change
@@ -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 }}

0 comments on commit b649cc2

Please sign in to comment.