diff --git a/.github/workflows/download.yml b/.github/workflows/download.yml index 4e2cd467..d2648a86 100644 --- a/.github/workflows/download.yml +++ b/.github/workflows/download.yml @@ -58,6 +58,21 @@ jobs: pr: ${{github.event.pull_request.number}} - name: Test run: cat artifact/sha | grep $GITHUB_SHA + download-commit: + runs-on: ubuntu-latest + needs: wait + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Download + uses: ./ + with: + workflow: upload.yml + name: artifact + path: artifact + commit: ${{ github.event.workflow_run.head_sha }} + - name: Test + run: cat artifact/sha | grep $GITHUB_SHA download-multiple: runs-on: ubuntu-latest needs: wait diff --git a/main.js b/main.js index 8689ecd2..02944817 100644 --- a/main.js +++ b/main.js @@ -109,12 +109,10 @@ async function main() { workflow_id: workflow, ...(branch ? { branch } : {}), ...(event ? { event } : {}), + ...(commit ? { head_sha: commit } : {}), } )) { for (const run of runs.data) { - if (commit && run.head_sha != commit) { - continue - } if (runNumber && run.run_number != runNumber) { continue }