From 975155ea1b3e6a07802f786d5dad0afdd31ee7ff Mon Sep 17 00:00:00 2001 From: Appu <77108939+appujet@users.noreply.github.com> Date: Mon, 8 Apr 2024 18:22:37 +0530 Subject: [PATCH] Create main .yml --- .github/workflows/main .yml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/main .yml diff --git a/.github/workflows/main .yml b/.github/workflows/main .yml new file mode 100644 index 0000000..bc619a6 --- /dev/null +++ b/.github/workflows/main .yml @@ -0,0 +1,35 @@ +name: Remove Duplicate Nodes + +on: + push: + branches: + - main + +jobs: + remove_duplicates: + runs-on: ubuntu-latest + + if: github.event_name == 'push' && github.ref == 'refs/heads/main' + + 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 "github-actions@users.noreply.github.com" + git config --global user.name "GitHub Actions" + git add . + git diff-index --quiet HEAD || git commit -m "Remove duplicate nodes" + git push