Skip to content

Commit c0d7ff0

Browse files
committed
ci: workflow to cleanup branches for testing
1 parent 053b675 commit c0d7ff0

File tree

2 files changed

+27
-1
lines changed

2 files changed

+27
-1
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: ci
22

33
on:
44
schedule:
5-
- cron: '0 10 * * *' # everyday at 10am
5+
- cron: '0 10 * * *'
66
push:
77
branches:
88
- 'dev'

.github/workflows/cleanup.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: cleanup
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: '0 0 1 * *'
7+
8+
jobs:
9+
branches:
10+
runs-on: ubuntu-latest
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
branch:
15+
- gh-pages
16+
- gh-pages-keep
17+
steps:
18+
-
19+
name: Delete branch
20+
uses: actions/github-script@v6
21+
with:
22+
script: |
23+
await github.rest.git.deleteRef({
24+
...context.repo,
25+
ref: "heads/${{ matrix.branch }}"
26+
});

0 commit comments

Comments
 (0)