ci: workflow to cleanup branches for testing

This commit is contained in:
CrazyMax 2022-10-18 21:49:55 +02:00
parent 053b675037
commit c0d7ff0487
No known key found for this signature in database
GPG Key ID: 3248E46B6BB8C7F7
2 changed files with 27 additions and 1 deletions

View File

@ -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
View 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 }}"
});