Skip to content

Commit

Permalink
Create domains.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Surfboardv2ray authored Jul 8, 2024
1 parent ecb8c71 commit 7644b99
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/domains.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Extract Domains

on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
jobs:
extract_domains:
runs-on: ubuntu-latest

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: |
python -m pip install --upgrade pip
- name: Run extraction script
run: |
python extract_domains.py
- name: Check for new changes
id: changes
run: |
git diff --quiet && echo 'No changes' || echo '::set-output name=changed::true'
- name: Commit and Push Changes
if: steps.changes.outputs.changed == 'true'
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add Domains/output.txt
timestamp=$(TZ='Asia/Tehran' date)
git commit -m "✅Updated on ${timestamp}"
git push

0 comments on commit 7644b99

Please sign in to comment.