-
Notifications
You must be signed in to change notification settings - Fork 43
44 lines (36 loc) · 1 KB
/
Copy pathfan.yaml
File metadata and controls
44 lines (36 loc) · 1 KB
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
44
name: Fetch Fan
on:
workflow_dispatch:
schedule:
- cron: '5 */4 * * *'
jobs:
run_python_script:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.x
- name: Install dependencies
run: pip install requests
- name: Run Python script
run: python ./fan.py
- id: check
name: Check for changes
run: |
if git diff-index --quiet HEAD --; then
echo "No changes detected. Skipping commit."
exit 0
fi
git config --global user.name "GitHub Actions"
git config --global user.email "actions@github.com"
git add .
git commit -m "update"
- name: Push changes
if: steps.check.conclusion == 'success'
uses: ad-m/github-push-action@master
with:
# github_token: ${{ secrets.TOKEN }}
branch: main