You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
180 lines
4.0 KiB
180 lines
4.0 KiB
--- |
|
name: Test Download Artifacts Action |
|
|
|
on: |
|
workflow_dispatch: |
|
inputs: {} |
|
workflow_run: |
|
workflows: |
|
- Upload Test Artifacts |
|
types: |
|
- completed |
|
|
|
jobs: |
|
download-latest: |
|
name: Download Latest |
|
runs-on: ubuntu-20.04 |
|
steps: |
|
- name: Checkout |
|
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 |
|
|
|
- name: Download |
|
uses: ./download-artifacts |
|
with: |
|
workflow: upload-test-artifacts.yml |
|
artifacts: artifact |
|
path: artifact |
|
|
|
- name: Test |
|
run: | |
|
cat artifact/sha |
|
echo $GITHUB_SHA |
|
|
|
|
|
download-master: |
|
name: Download master |
|
runs-on: ubuntu-20.04 |
|
if: github.ref == 'refs/heads/master' |
|
steps: |
|
- name: Checkout |
|
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 |
|
|
|
- name: Download |
|
uses: ./download-artifacts |
|
with: |
|
workflow: upload-test-artifacts.yml |
|
artifacts: artifact |
|
path: artifact |
|
branch: master |
|
|
|
- name: Test |
|
run: | |
|
cat artifact/sha |
|
echo $GITHUB_SHA |
|
|
|
download-branch: |
|
name: Download current branch |
|
runs-on: ubuntu-20.04 |
|
steps: |
|
- name: Checkout |
|
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 |
|
|
|
- name: Extract branch name |
|
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" |
|
id: extract_branch |
|
|
|
- name: Download |
|
uses: ./download-artifacts |
|
with: |
|
workflow: upload-test-artifacts.yml |
|
artifacts: artifact |
|
path: artifact |
|
branch: ${{ steps.extract_branch.outputs.branch }} |
|
|
|
- name: Test |
|
run: | |
|
cat artifact/sha |
|
echo $GITHUB_SHA |
|
|
|
download-pr: |
|
name: Download Pull Request |
|
runs-on: ubuntu-20.04 |
|
if: github.ref != 'refs/heads/master' |
|
steps: |
|
- name: Checkout |
|
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 |
|
|
|
- name: Download |
|
uses: ./download-artifacts |
|
with: |
|
workflow: upload-test-artifacts.yml |
|
artifacts: artifact |
|
path: artifact |
|
pr: ${{github.event.pull_request.number}} |
|
|
|
- name: Test |
|
run: | |
|
cat artifact/sha |
|
echo $GITHUB_SHA |
|
|
|
|
|
download-all: |
|
name: Download All |
|
runs-on: ubuntu-20.04 |
|
steps: |
|
- name: Checkout |
|
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 |
|
|
|
- name: Download |
|
uses: ./download-artifacts |
|
with: |
|
workflow: upload-test-artifacts.yml |
|
|
|
- name: Test |
|
run: | |
|
ls -atlh |
|
cat sha |
|
cat sha1 |
|
cat sha2 |
|
|
|
|
|
download-multiple: |
|
name: Download Multiple |
|
runs-on: ubuntu-20.04 |
|
steps: |
|
- name: Checkout |
|
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 |
|
|
|
- name: Download |
|
uses: ./download-artifacts |
|
with: |
|
workflow: upload-test-artifacts.yml |
|
artifacts: 'artifact1, |
|
artifact2' |
|
|
|
- name: Test |
|
run: | |
|
ls -atlh |
|
cat sha1 |
|
cat sha2 |
|
|
|
|
|
download-wildcard: |
|
name: Download Wildcard |
|
runs-on: ubuntu-20.04 |
|
steps: |
|
- name: Checkout |
|
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 |
|
|
|
- name: Download |
|
uses: ./download-artifacts |
|
with: |
|
workflow: upload-test-artifacts.yml |
|
artifacts: '*.txt' |
|
|
|
- name: Test |
|
run: | |
|
ls -atlh |
|
cat sha1 |
|
cat sha2 |
|
|
|
|
|
download-conclusion: |
|
name: Download Conclusion |
|
runs-on: ubuntu-20.04 |
|
steps: |
|
- name: Checkout |
|
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 |
|
|
|
- name: Download |
|
uses: ./download-artifacts |
|
with: |
|
workflow: upload-test-artifacts.yml |
|
artifacts: artifact |
|
path: artifact |
|
workflow_conclusion: '' |
|
|
|
- name: Test |
|
run: | |
|
cat artifact/sha |
|
echo $GITHUB_SHA
|
|
|