-
-
Notifications
You must be signed in to change notification settings - Fork 56
35 lines (31 loc) · 737 Bytes
/
cleanup.yml
File metadata and controls
35 lines (31 loc) · 737 Bytes
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
name: cleanup
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
on:
workflow_dispatch:
schedule:
- cron: '0 0 1 * *'
jobs:
branches:
runs-on: ubuntu-latest
permissions:
contents: write # required to remove git branch
strategy:
fail-fast: false
matrix:
branch:
- gh-pages
- gh-pages-keep
steps:
-
name: Delete branch
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
with:
script: |
await github.rest.git.deleteRef({
...context.repo,
ref: "heads/${{ matrix.branch }}"
});