File tree Expand file tree Collapse file tree 2 files changed +47
-0
lines changed Expand file tree Collapse file tree 2 files changed +47
-0
lines changed Original file line number Diff line number Diff line change 1+ name : cleanup caches by a branch
2+ on :
3+ pull_request :
4+ types :
5+ - closed
6+
7+ jobs :
8+ cleanup :
9+ runs-on : ubuntu-latest
10+ steps :
11+ - name : Check out code
12+ uses : actions/checkout@v4
13+
14+ - name : Cleanup
15+ run : |
16+ gh extension install actions/gh-actions-cache
17+
18+ REPO=${{ github.repository }}
19+ BRANCH="refs/pull/${{ github.event.pull_request.number }}/merge"
20+
21+ echo "Fetching list of cache key"
22+ cacheKeysForPR=$(gh actions-cache list -R $REPO -B $BRANCH -L 100 | cut -f 1 )
23+
24+ ## Setting this to not fail the workflow while deleting cache keys.
25+ set +e
26+ echo "Deleting caches..."
27+ for cacheKey in $cacheKeysForPR
28+ do
29+ gh actions-cache delete $cacheKey -R $REPO -B $BRANCH --confirm
30+ done
31+ echo "Done"
32+ env :
33+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change 1+ name : Enforce License Compliance
2+
3+ on :
4+ pull_request :
5+ branches : [main, master]
6+
7+ jobs :
8+ enforce-license-compliance :
9+ runs-on : ubuntu-latest
10+ steps :
11+ - name : ' Enforce License Compliance'
12+ uses : getsentry/action-enforce-license-compliance@57ba820387a1a9315a46115ee276b2968da51f3d # main
13+ with :
14+ fossa_api_key : ${{ secrets.FOSSA_API_KEY }}
You can’t perform that action at this time.
0 commit comments