Save Spotify playlist #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Save Spotify playlist | |
on: | |
schedule: | |
- cron: "00 01 20 Mar,Jun,Sep,Dec *" | |
jobs: | |
spotify-to-yaml: | |
runs-on: macOS-latest | |
name: Save Spotify playlist and thumbnail | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Save the playlist | |
uses: ./ | |
with: | |
spotify-username: "katydecorah" | |
env: | |
SpotifyClientID: ${{ secrets.SpotifyClientID }} | |
SpotifyClientSecret: ${{ secrets.SpotifyClientSecret}} | |
SpotifyUser: ${{ secrets.SpotifyUser }} | |
- name: Save the thumbnail | |
run: curl "${{ env.PlaylistImage }}" -o "img/playlists/${{ env.PlaylistImageOutput }}" | |
- name: Commit files | |
run: | | |
git pull | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Action" | |
git add -A && git commit -m "🎵 ${{ env.playlist }}" | |
git push |