Skip to content

Create domains.yml

Create domains.yml #1

Workflow file for this run

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