-
Notifications
You must be signed in to change notification settings - Fork 1
33 lines (33 loc) · 1.18 KB
/
remove.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
name: Removal Issue Solver
on:
issues:
types:
- labeled
jobs:
domains_removal:
if: github.event.label.name == 'remove'
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Close Issue
uses: peter-evans/close-issue@v3
with:
issue-number: ${{ github.event.issue.number }}
comment: Terima kasih atas kontribusi Anda, permintaan penghapusan domain Anda akan diterapkan pada siklus update selanjutnya.
- name: Remove Domain from Issue
run: |
domain=$(jq -r '.issue.body' "$GITHUB_EVENT_PATH" | sed -n '3p')
sed -i "/$domain/d" domainlist
echo "Domain $domain removed from domainlist."
- name: Commit changes
run: |
git config --global user.email "[email protected]"
git config --global user.name "zksbot"
git add hosts domainlist
domain=$(jq -r '.issue.body' "$GITHUB_EVENT_PATH" | sed -n '3p')
git commit -m "Remove $domain from domainlist"
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.UPDATE_TOKEN }}