forked from getsentry/sentry-javascript
-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (39 loc) · 1.2 KB
/
clear-cache.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: "Action: Clear all GHA caches"
on:
workflow_dispatch:
inputs:
clear_pending_prs:
description: Delete caches of pending PR workflows
type: boolean
default: false
clear_develop:
description: Delete caches on develop branch
type: boolean
default: false
clear_branches:
description: Delete caches on non-develop branches
type: boolean
default: true
schedule:
# Run every day at midnight
- cron: '0 0 * * *'
jobs:
clear-caches:
name: Delete all caches
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version-file: 'package.json'
# TODO: Use cached version if possible (but never store cache)
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Delete GHA caches
uses: ./dev-packages/clear-cache-gh-action
with:
clear_pending_prs: ${{ inputs.clear_pending_prs }}
clear_develop: ${{ inputs.clear_develop }}
clear_branches: ${{ inputs.clear_branches }}
github_token: ${{ secrets.GITHUB_TOKEN }}