Skip to content

Commit

Permalink
Skip current run
Browse files Browse the repository at this point in the history
  • Loading branch information
back-2-95 committed Apr 15, 2024
1 parent cc10293 commit a6465de
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions cleanup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@ do
run_ids=( $(run gh api repos/$GH_REPO/actions/workflows/$workflow_id/runs --paginate | jq '.workflow_runs[].id') )
for run_id in "${run_ids[@]}"
do
# delete if not the current run
if [ $run_id -eq $GITHUB_RUN_ID ]
then
info "- Skipping current run ID $run_id"
continue
fi

info "- Deleting Run ID $run_id"
gh api repos/$GH_REPO/actions/runs/$run_id -X DELETE >/dev/null
#run gh run delete $run_id
Expand Down

0 comments on commit a6465de

Please sign in to comment.