Skip to content

Commit

Permalink
Always pull latest image in docker build (#132)
Browse files Browse the repository at this point in the history
* Always pull latest image in docker build

* Spotify connection issue?

* Spotify connection issue 2
  • Loading branch information
camero2734 authored Nov 6, 2024
1 parent 2ad2717 commit 971860f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ jobs:
- name: Build and push image
uses: docker/build-push-action@v5
with:
pull: true
push: true
tags: camer0/nico:${{ env.TAG }}
context: .
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ jobs:
if: steps.check-tag.outcome == 'failure'
uses: docker/build-push-action@v5
with:
pull: true
push: true
tags: camer0/nico:${{ env.TAG }}
context: .
Expand Down
8 changes: 6 additions & 2 deletions src/Helpers/apis/spotify.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ export const SpotifyClient = new SpotifyAPI({
});

(async () => {
const res = await SpotifyClient.clientCredentialsGrant();
SpotifyClient.setAccessToken(res.body.access_token);
try {
const res = await SpotifyClient.clientCredentialsGrant();
SpotifyClient.setAccessToken(res.body.access_token);
} catch (err) {
console.error("SpotifyClientError: ", err);
}
})();

0 comments on commit 971860f

Please sign in to comment.