-
Notifications
You must be signed in to change notification settings - Fork 7
39 lines (34 loc) · 1 KB
/
cleanup-plan-docs.yml
File metadata and controls
39 lines (34 loc) · 1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: Cleanup Plan Docs
on:
pull_request:
types: [closed]
branches: [staging]
jobs:
cleanup:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
permissions:
contents: write
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: false
steps:
- name: Checkout staging
uses: actions/checkout@v4
with:
ref: staging
token: ${{ github.token }}
- name: Configure Git User
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
- name: Remove planning docs
run: |
git rm -f PLAN-*.md --ignore-unmatch
git rm -rf docs/plans/ --ignore-unmatch
- name: Commit and push if changed
run: |
if ! git diff --cached --quiet --exit-code; then
git commit -m "chore: remove planning docs post-merge [skip ci]"
git push origin staging
fi