Skip to content
This repository has been archived by the owner on Jan 24, 2024. It is now read-only.

Commit

Permalink
Update workflows to use permanent staging server
Browse files Browse the repository at this point in the history
  • Loading branch information
imyourmanzi committed May 9, 2023
1 parent c183b63 commit 3562aec
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pull-request-staging-cleanup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ jobs:
- uses: google-github-actions/setup-gcloud@v1
with:
project_id: imyourmanzi-spotifyplaylistmgr
- run: gcloud run deploy staging-server --image us-central1-docker.pkg.dev/imyourmanzi-spotifyplaylistmgr/server-images/server:latest --region us-central1
- run: gcloud artifacts docker images delete us-central1-docker.pkg.dev/imyourmanzi-spotifyplaylistmgr/server-images/server:pr-${{ github.event.pull_request.number }}-latest
- run: gcloud run services delete staging-server-pr-${{ github.event.pull_request.number }}-latest --region us-central1
11 changes: 1 addition & 10 deletions .github/workflows/pull-request-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,4 @@ jobs:
- run: docker build --platform=linux/amd64 . -t us-central1-docker.pkg.dev/imyourmanzi-spotifyplaylistmgr/server-images/server:pr-${{ github.event.pull_request.number }}-latest
- run: echo '${{ steps.gcp_auth.outputs.access_token }}' | docker login -u oauth2accesstoken --password-stdin https://us-central1-docker.pkg.dev
- run: docker push us-central1-docker.pkg.dev/imyourmanzi-spotifyplaylistmgr/server-images/server:pr-${{ github.event.pull_request.number }}-latest
- run: |
gcloud run deploy \
staging-server \
--region us-central1 \
--image us-central1-docker.pkg.dev/imyourmanzi-spotifyplaylistmgr/server-images/server:pr-${{ github.event.pull_request.number }}-latest \
--revision-suffix "$(date +'%Y%m%d-%H%M%S')" \
--set-env-vars SPOTIFY_CLIENT_ID=b80440eadf0a4f989bba93e5b4ff2fc5,SPOTIFY_REDIRECT_URI=https://imyourmanzi-spotifyplaylistmgr--staging.web.app/callback/ \
--set-secrets SPOTIFY_SECRET=spotify-client-secret:latest \
--port 8080 \
--service-account server-run@imyourmanzi-spotifyplaylistmgr.iam.gserviceaccount.com
- run: gcloud run deploy staging-server --region us-central1 --image us-central1-docker.pkg.dev/imyourmanzi-spotifyplaylistmgr/server-images/server:pr-${{ github.event.pull_request.number }}-latest

0 comments on commit 3562aec

Please sign in to comment.