-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (47 loc) · 1.3 KB
/
update_feed.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
44
45
46
47
name: Update Feed
# on:
# push:
# branches: [ "main" ]
# pull_request:
# branches: [ "main" ]
on:
schedule:
- cron: '0 1 * * *' # daily update
workflow_dispatch:
jobs:
update_feed:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"
# cache: 'pip' # needs a requirements.txt
- name: Run update script
run: python ./src/update_feed.py
- name: commit updates (if available)
run: |
git config --local user.name "github-actions[bot]"
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git add .
if [ -z "$(git status --porcelain)" ]; then
echo "No updates available"
exit 0
fi
git commit -m "new update"
git push origin main
# - name: Install dependencies
# run: |
# python -m pip install --upgrade pip
# pip install flake8 pytest
# if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
# - name: Lint with Ruff
# run: |
# pip install ruff
# ruff --output-format=github .
# - name: Test with pytest
# run: |
# pytest