Skip to content

Commit dfa094c

Browse files
Add CI/CD workflow for cleaning up closed pull requests (#2)
1 parent 15fac1c commit dfa094c

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: CI/CD (Clean up)
2+
3+
on:
4+
pull_request:
5+
types: [closed]
6+
workflow_dispatch: ~
7+
8+
env:
9+
SOURCE_BRANCH: ${{ github.head_ref || github.ref_name }}
10+
RELEASE_BRANCH: "release/${{ github.head_ref || github.ref_name }}"
11+
12+
jobs:
13+
clean-up:
14+
name: Clean up
15+
runs-on: [ubuntu-latest]
16+
steps:
17+
- uses: actions/github-script@v7
18+
with:
19+
script: |
20+
github.rest.git.deleteRef({
21+
owner: context.repo.owner,
22+
repo: context.repo.repo,
23+
ref: "heads/${{ env.RELEASE_BRANCH }}",
24+
});

0 commit comments

Comments
 (0)