-
Notifications
You must be signed in to change notification settings - Fork 85
43 lines (35 loc) · 1.08 KB
/
main .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
39
40
41
42
43
name: Remove Duplicate Nodes
on:
push:
branches:
- main
pull_request:
types: [closed]
jobs:
remove_duplicates:
runs-on: ubuntu-latest
if: >
github.event_name == 'push' &&
github.ref == 'refs/heads/main' &&
github.actor.login == 'github-actions[bot]' ||
github.event_name == 'pull_request' &&
github.event.pull_request.merged == true &&
github.actor.login == 'github-actions[bot]'
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install Dependencies
run: pip install -r requirements.txt
- name: Run Python Script
run: python remove_duplicates.py
- name: Commit Changes
run: |
git config --global user.email "[email protected]"
git config --global user.name "GitHub Actions"
git add .
git diff-index --quiet HEAD || git commit -m "Remove duplicate nodes"
git push