Skip to content

Commit

Permalink
Skip own workflow run during cleanup (open-telemetry#2877)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffreyc-splunk authored Mar 27, 2023
1 parent c1de44b commit 31f5c81
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/cleanup-closed-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,12 @@ jobs:
## Setting this to not fail the workflow while cancelling workflow runs.
set +e
echo "Cancelling workflow runs ..."
for id in $runIdsForBranch
do
gh run cancel -R $REPO $id
if [[ "${{ github.run_id }}" != "$id" ]]; then
echo "Cancelling workflow run ${{ github.server_url }}/${REPO}/actions/runs/${id} ..."
gh run cancel -R $REPO $id
fi
done
echo "Done"
env:
Expand Down

0 comments on commit 31f5c81

Please sign in to comment.