-
Notifications
You must be signed in to change notification settings - Fork 243
48 lines (42 loc) · 1.46 KB
/
main.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
on:
workflow_dispatch:
push:
branches:
- main
schedule:
- cron: '0 0 * * *' # @daily
jobs:
main:
runs-on: ubuntu-latest
steps:
- name: Checkout mackorone/spotify-playlist-archive-src
uses: actions/checkout@v4
with:
repository: mackorone/spotify-playlist-archive-src
path: spotify-playlist-archive-src
submodules: recursive
- name: Checkout mackorone/spotify-playlist-archive
uses: actions/checkout@v4
with:
repository: mackorone/spotify-playlist-archive
path: spotify-playlist-archive
# Also fetch the second-to-last commit so the script can determine,
# via git commands, which files changed in the most recent commit
fetch-depth: 2
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install dependencies
working-directory: spotify-playlist-archive-src
run: |
python -m pip install --upgrade pip
pip install -r requirements/requirements.txt
- name: Run script
working-directory: spotify-playlist-archive
env:
SPOTIFY_CLIENT_ID: ${{ secrets.SPOTIFY_CLIENT_ID }}
SPOTIFY_CLIENT_SECRET: ${{ secrets.SPOTIFY_CLIENT_SECRET }}
run: >
python $GITHUB_WORKSPACE/spotify-playlist-archive-src/src/main.py
--playlists-dir playlists --commit-and-push --auto-register