-
Notifications
You must be signed in to change notification settings - Fork 1
35 lines (32 loc) · 1.3 KB
/
run-playlist-update-cron.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
name: run-playlist-update-cron
on:
workflow_dispatch:
schedule:
- cron: "0 0 * * 0" # Run at midnight every Sunday
jobs:
update-playlists:
runs-on: ubuntu-latest
steps:
- name: checkout repo content
uses: actions/checkout@v2 # checkout the repository content to github runner.
- name: 🐍 Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- 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: Run update_playlists task
run: |
python main.py --task update_playlists
env:
spotipy_client_id: ${{ secrets.SPOTIPY_CLIENT_ID }} # if run.py requires passwords..etc, set it as secrets
spotipy_client_secret: ${{ secrets.SPOTIPY_CLIENT_SECRET }}
spotipy_client_username: ${{ secrets.SPOTIPY_CLIENT_USERNAME }}
spotipy_user_token: ${{ secrets.SPOTIFY_USER_TOKEN }}
spotipy_refresh_token: ${{ secrets.SPOTIFY_REFRESH_TOKEN }}
PRAW_CLIENT_ID: ${{ secrets.PRAW_CLIENT_ID }}
PRAW_CLIENT_SECRET: ${{ secrets.PRAW_CLIENT_SECRET }}
PRAW_USER_AGENT: ${{ secrets.PRAW_USER_AGENT }}