Skip to content

Generate Playlist

Generate Playlist #172

name: Generate Playlist
on:
schedule:
# 6am UTC monday
- cron: '0 6 * * 1'
workflow_dispatch:
jobs:
generate-playlist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: 1.17
- name: get access token
run: echo "SPOTIFY_ACCESS_TOKEN=$(scripts/get-access-token.sh)" >> $GITHUB_ENV
env:
SPOTIFY_CLIENT_ID: ${{ secrets.SPOTIFY_CLIENT_ID }}
SPOTIFY_CLIENT_SECRET: ${{ secrets.SPOTIFY_CLIENT_SECRET }}
SPOTIFY_REFRESH_TOKEN: ${{ secrets.SPOTIFY_REFRESH_TOKEN }}
- name: generate playlist
run: go run ./cmd/
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "Generate weekly playlist"
file_pattern: playlists/*.md
commit_author: Github Actions <[email protected]>