Skip to content

.github/workflows/main.yml #1662

.github/workflows/main.yml

.github/workflows/main.yml #1662

Workflow file for this run

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