Skip to content

Commit 1eba168

Browse files
committed
feat: automatic branch deletion
1 parent 4681526 commit 1eba168

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

.github/workflows/clean.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Clean
2+
3+
on:
4+
pull_request:
5+
types:
6+
- closed
7+
8+
jobs:
9+
check-deployment-stop:
10+
name: "Check / Deployment Stop"
11+
runs-on: ubuntu-latest
12+
container:
13+
image: ghcr.io/matrixai/github-runner
14+
concurrency:
15+
group: check-deployment-stop
16+
cancel-in-progress: false
17+
if: startsWith(github.head_ref, 'feature')
18+
steps:
19+
- uses: actions/checkout@v4
20+
- name: Run deployment
21+
env:
22+
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
23+
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
24+
run: |
25+
echo 'Perform service deployment for feature'
26+
nix develop .#ci --command bash -c $'
27+
wrangler delete --name "polykey-docs-dev-$GITHUB_HEAD_REF" --force
28+
'

0 commit comments

Comments
 (0)