Generate Playlist #109
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: 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]> |