-
Notifications
You must be signed in to change notification settings - Fork 8
43 lines (38 loc) · 1.04 KB
/
domains.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: 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