Skip to content

Commit

Permalink
ci: workflow to cleanup branches for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
crazy-max committed Oct 18, 2022
1 parent 053b675 commit c0d7ff0
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: ci

on:
schedule:
- cron: '0 10 * * *' # everyday at 10am
- cron: '0 10 * * *'
push:
branches:
- 'dev'
Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/cleanup.yml
Original file line number Diff line number Diff line change
@@ -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 }}"
});

0 comments on commit c0d7ff0

Please sign in to comment.