fix(ci): ajusta configuração do teste para desabilitar threads no npm… #12
This file contains hidden or 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: Deploy Backend to Cloud Run | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - 'linktreeclone-backend/**' | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: 'read' | |
| id-token: 'write' | |
| defaults: | |
| run: | |
| working-directory: ./linktreeclone-backend | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| - name: Authenticate to Google Cloud | |
| uses: google-github-actions/auth@v2 | |
| with: | |
| workload_identity_provider: ${{ secrets.GCP_WORKLOAD_IDENTITY_PROVIDER }} | |
| service_account: ${{ secrets.GCP_SERVICE_ACCOUNT }} | |
| - name: Build and Push Docker image | |
| run: |- | |
| gcloud builds submit --tag southamerica-east1-docker.pkg.dev/${{ secrets.GCP_PROJECT_ID }}/linktree-repo/linktree-clone-api:latest . | |
| - name: Deploy to Cloud Run | |
| run: |- | |
| gcloud run deploy linktree-clone-api \ | |
| --image southamerica-east1-docker.pkg.dev/${{ secrets.GCP_PROJECT_ID }}/linktree-repo/linktree-clone-api:latest \ | |
| --platform managed \ | |
| --region southamerica-east1 \ | |
| --allow-unauthenticated \ | |
| --add-cloudsql-instances=gen-lang-client-0887157069:southamerica-east1:multi-project-dev-db \ | |
| --set-env-vars="SPRING_DATASOURCE_URL=jdbc:postgresql://google/linktree_db?cloudSqlInstance=gen-lang-client-0887157069:southamerica-east1:multi-project-dev-db&socketFactory=com.google.cloud.sql.postgres.SocketFactory" \ | |
| --set-env-vars="SPRING_DATASOURCE_USERNAME=postgres" \ | |
| --set-env-vars="JWT_EXPIRATION=86400000" \ | |
| --update-secrets=SPRING_DATASOURCE_PASSWORD=linktree-db-password:latest,JWT_SECRET=jwt-secret:latest \ | |
| --quiet |