-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (31 loc) · 1.1 KB
/
close-pr.yml
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
name: Cleanup PR
on:
pull_request:
types:
- closed
jobs:
cleanup:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: documentation
- name: Delete coverage/documentation for ${{ github.event.pull_request.number }} from documentation branch
run: |
folder_to_delete="${{ github.event.pull_request.number }}/merge"
echo "Deleting folder: $folder_to_delete from documentation"
rm -rf "$folder_to_delete"
git rm -r "$folder_to_delete" || true
- name: Configure Git for Pushing Deletion change
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
- name: Commit Deletion Change
run: |
git add -A
pr="${{ github.event.pull_request.number }}"
git commit -m "Remove folder ${pr}/merge from documentation branch because PR ${pr} is closed"
- name: Pushing Deletion Change
run: |
git push origin documentation