Skip to content

pr again

pr again #610

Workflow file for this run

name: Download
on:
push:
branches:
- master
pull_request:
workflow_dispatch:
jobs:
wait:
runs-on: ubuntu-24.04
steps:
- name: Wait
run: sleep 60
download:
runs-on: ubuntu-24.04
needs: wait
strategy:
matrix:
type: [latest, search-workflow, branch, pr, commit, multiple, regexp, empty-conclusion, skip-unpack, dry-run-exists, dry-run-not-exists, with-check-artifacts, with-search-artifacts, regexp-with-search-artifacts]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Download
uses: ./
with:
workflow: upload.yml
name: artifact
path: artifact
type: ${{ matrix.type }}
branch: ${{ matrix.type == 'branch' && 'master' || '' }}
pr: ${{ matrix.type == 'pr' && github.event.pull_request.number || '' }}
commit: ${{ matrix.type == 'commit' && github.event.workflow_run.head_sha || '' }}
workflow_conclusion: ${{ matrix.type == 'empty-conclusion' && '' || null }}
skip_unpack: ${{ matrix.type == 'skip-unpack' && 'true' || null }}
dry_run: ${{ matrix.type == 'dry-run-exists' && 'true' || matrix.type == 'dry-run-not-exists' && 'true' || null }}
search_artifacts: ${{ matrix.type == 'with-search-artifacts' || matrix.type == 'regexp-with-search-artifacts' && 'true' || null }}
name_is_regexp: ${{ matrix.type == 'regexp' || matrix.type == 'regexp-with-search-artifacts' && 'true' || null }}
check_artifacts: ${{ matrix.type == 'with-check-artifacts' && 'true' || null }}
- name: Test
run: |
if [[ "${{ matrix.type }}" == "multiple" ]]; then
cat artifact/sha | grep $GITHUB_SHA
cat artifact1/sha1 | grep $GITHUB_SHA
cat artifact2/sha2 | grep $GITHUB_SHA
elif [[ "${{ matrix.type }}" == "regexp" || "${{ matrix.type }}" == "regexp-with-search-artifacts" ]]; then
cat artifact/artifact1/sha1 | grep $GITHUB_SHA
cat artifact/artifact2/sha2 | grep $GITHUB_SHA
! test -d artifact/artifact/artifact
! test -f artifact/artifact.zip
elif [[ "${{ matrix.type }}" == "dry-run-exists" ]]; then
test ${{ steps.download.outputs.dry_run }} == true
elif [[ "${{ matrix.type }}" == "dry-run-not-exists" ]]; then
test ${{ steps.download.outputs.dry_run }} == false
else
cat artifact/sha | grep $GITHUB_SHA
fi