Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/swinton/spothub
:headphones: :relaxed: Collaborate on Spotify playlists using Pull Requests, powered by GitHub Actions
https://github.com/swinton/spothub
github github-actions spotify spotify-api spotify-playlist spotify-web-api
Last synced: 3 months ago
JSON representation
:headphones: :relaxed: Collaborate on Spotify playlists using Pull Requests, powered by GitHub Actions
- Host: GitHub
- URL: https://github.com/swinton/spothub
- Owner: swinton
- License: isc
- Created: 2018-09-29T16:21:21.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-08-20T22:07:22.000Z (over 4 years ago)
- Last Synced: 2024-10-30T07:48:12.317Z (3 months ago)
- Topics: github, github-actions, spotify, spotify-api, spotify-playlist, spotify-web-api
- Language: Shell
- Homepage:
- Size: 23.4 KB
- Stars: 114
- Watchers: 3
- Forks: 22
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# SpotHub
> Collaborate on Spotify playlists using Pull Requests :headphones: :relaxed:
## How does this even work?
Using [**GitHub Actions**](https://github.com/features/actions) of course!
On every `push` to the `master` branch, [the Action](https://github.com/swinton/SpotHub/blob/bc2d697744a710bce3ce6a56a10d473045c3ea53/.github/actions/spotify-playlist/Dockerfile) will:
1. [Grab a fresh _access token_ from Spotify](https://github.com/swinton/SpotHub/blob/bc2d697744a710bce3ce6a56a10d473045c3ea53/.github/actions/spotify-playlist/get_access_token.sh), using the `SPOTIFY_AUTH` and `SPOTIFY_REFRESH_TOKEN` [secrets](https://developer.github.com/actions/creating-workflows/storing-secrets/).
1. [Generate a JSON payload](https://github.com/swinton/SpotHub/blob/bc2d697744a710bce3ce6a56a10d473045c3ea53/.github/actions/spotify-playlist/process_playlist.sh), from [`playlist.csv`](playlist.csv).
1. [Update a playlist on Spotify](https://github.com/swinton/SpotHub/blob/bc2d697744a710bce3ce6a56a10d473045c3ea53/.github/actions/spotify-playlist/populate_playlist.sh), specified by the `playlist_id` [environment variable](https://developer.github.com/actions/creating-github-actions/accessing-the-runtime-environment/#environment-variables).## What do I do?
1. Update `playlist.csv`
1. `git commit`
1. `git push`
1. Enjoy your [updated Spotify playlist](https://open.spotify.com/user/stevewinton/playlist/5lNXObovv3WL1Ioyag2FuG)## Why was this built?
So we can [collaborate on playlists the right way](https://github.com/swinton/SpotHub/pull/1) :wink:
Also, because I :heart: Spotify and GitHub, and now I can bring 2 of my favorite things together with [GitHub Actions](https://github.com/features/actions).
Sign up for the GitHub Actions beta [here](https://github.com/features/actions) :headphones: :relaxed: