diff --git a/.github/workflows/download.yml b/.github/workflows/download.yml index 03c2d14f..2cadcae8 100644 --- a/.github/workflows/download.yml +++ b/.github/workflows/download.yml @@ -26,6 +26,19 @@ jobs: path: artifact - name: Test run: cat artifact/sha | grep $GITHUB_SHA + download-search-workflow: + runs-on: ubuntu-latest + needs: wait + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Download + uses: ./ + with: + name: artifact + path: artifact + - name: Test + run: cat artifact/sha | grep $GITHUB_SHA download-branch: runs-on: ubuntu-latest needs: wait diff --git a/main.js b/main.js index 422d9088..e087aebf 100644 --- a/main.js +++ b/main.js @@ -121,12 +121,10 @@ async function main() { ...(workflow ? { 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 }