-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (42 loc) · 1.42 KB
/
build_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
48
49
50
51
52
name: Hourly Feed Build
on:
workflow_dispatch:
schedule:
- cron: "30 */3 * * *"
jobs:
generate-feed:
runs-on: ubuntu-latest
name: Generate feed
permissions:
# Give the default GITHUB_TOKEN write permission to commit and push the
# added or changed files to the repository.
contents: write
steps:
- name: "Set current date as env variable"
run: |
echo "date=$(date +'%Y-%m-%d %H:%M')" >> $GITHUB_OUTPUT
id: date # this is used on variable path
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: '3.12'
cache: 'pip'
- name: Install python packages
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Execute script
env:
PH_CLIENT_ID: ${{ secrets.PH_CLIENT_ID }}
PH_CLIENT_SECRET: ${{ secrets.PH_CLIENT_SECRET }}
run: python main.py
working-directory: ./src
# Commit all changed files back to the repository
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Daily feed update for ${{ steps.date.outputs.date }}
commit_author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>