[ci] Parameterize branch cleanup

Allow a PR number to be passed as input
This commit is contained in:
Lauren Tan
2025-03-19 16:14:56 -04:00
parent 208905257f
commit ca6a38c115
@@ -6,6 +6,10 @@ on:
types:
- closed
workflow_dispatch:
inputs:
pr_number:
required: true
type: string
jobs:
cleanup:
@@ -27,9 +31,10 @@ jobs:
for cacheKey in $cacheKeysForPR
do
gh cache delete $cacheKey
echo "Deleting $cacheKey"
done
echo "Done"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.repository }}
BRANCH: refs/pull/${{ github.event.pull_request.number }}/merge
BRANCH: refs/pull/${{ inputs.pr_number || github.event.pull_request.number }}/merge