ci: workflow to cleanup branches for testing
This commit is contained in:
parent
053b675037
commit
c0d7ff0487
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
|
@ -2,7 +2,7 @@ name: ci
|
|||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 10 * * *' # everyday at 10am
|
||||
- cron: '0 10 * * *'
|
||||
push:
|
||||
branches:
|
||||
- 'dev'
|
||||
|
|
26
.github/workflows/cleanup.yml
vendored
Normal file
26
.github/workflows/cleanup.yml
vendored
Normal file
|
@ -0,0 +1,26 @@
|
|||
name: cleanup
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: '0 0 1 * *'
|
||||
|
||||
jobs:
|
||||
branches:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
branch:
|
||||
- gh-pages
|
||||
- gh-pages-keep
|
||||
steps:
|
||||
-
|
||||
name: Delete branch
|
||||
uses: actions/github-script@v6
|
||||
with:
|
||||
script: |
|
||||
await github.rest.git.deleteRef({
|
||||
...context.repo,
|
||||
ref: "heads/${{ matrix.branch }}"
|
||||
});
|
Loading…
Reference in New Issue
Block a user