diff --git a/.github/workflows/pull-request-staging-cleanup.yml b/.github/workflows/pull-request-staging-cleanup.yml index 84687cf..9f33eea 100644 --- a/.github/workflows/pull-request-staging-cleanup.yml +++ b/.github/workflows/pull-request-staging-cleanup.yml @@ -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 diff --git a/.github/workflows/pull-request-staging.yml b/.github/workflows/pull-request-staging.yml index e6f3685..ff4b610 100644 --- a/.github/workflows/pull-request-staging.yml +++ b/.github/workflows/pull-request-staging.yml @@ -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