Skip to content

Commit e454ec2

Browse files
authored
Head sha revert (#271)
* fix: get workflows only for commit In f6b0bac the check on the commit value provided was moved to the body of the function. Instead directly provide it as parameter of the request as it was before assuming that this might affect the number of requests sent. * test: check download without workflow set This tests searching for a workflow if not provided.
1 parent f6b0bac commit e454ec2

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

.github/workflows/download.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,19 @@ jobs:
2626
path: artifact
2727
- name: Test
2828
run: cat artifact/sha | grep $GITHUB_SHA
29+
download-search-workflow:
30+
runs-on: ubuntu-latest
31+
needs: wait
32+
steps:
33+
- name: Checkout
34+
uses: actions/checkout@v4
35+
- name: Download
36+
uses: ./
37+
with:
38+
name: artifact
39+
path: artifact
40+
- name: Test
41+
run: cat artifact/sha | grep $GITHUB_SHA
2942
download-branch:
3043
runs-on: ubuntu-latest
3144
needs: wait

main.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,12 +121,10 @@ async function main() {
121121
...(workflow ? { workflow_id: workflow } : {}),
122122
...(branch ? { branch } : {}),
123123
...(event ? { event } : {}),
124+
...(commit ? { head_sha: commit } : {}),
124125
}
125126
)) {
126127
for (const run of runs.data) {
127-
if (commit && run.head_sha != commit) {
128-
continue
129-
}
130128
if (runNumber && run.run_number != runNumber) {
131129
continue
132130
}

0 commit comments

Comments
 (0)