Skip to content

Commit 81e16d0

Browse files
committed
Only get artifact from successful runs
1 parent 8c175bd commit 81e16d0

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

.github/workflows/vartest.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,11 @@ jobs:
2222
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2323
run: |
2424
# Fetches the ID of the last completed run for the current workflow
25-
PREVIOUS_RUN_ID=$(gh run list --workflow "${{ github.workflow }}" --status completed --limit 1 --json databaseId --jq '.[0].databaseId')
25+
PREVIOUS_RUN_ID=$(gh run list --workflow "${{ github.workflow }}" \
26+
--status success \
27+
--limit 1 \
28+
--json databaseId \
29+
--jq '.[0].databaseId')
2630
echo "previous_run_id=$PREVIOUS_RUN_ID" >> "$GITHUB_OUTPUT"
2731
- name: Test previous run id
2832
run: echo "${{ steps.get_id.outputs.previous_run_id }}"

0 commit comments

Comments
 (0)