|
37 | 37 | with: |
38 | 38 | create_credentials_file: true |
39 | 39 | token_format: "access_token" |
40 | | - workload_identity_provider: 'projects/1006240973223/locations/global/workloadIdentityPools/deploy-backstage/providers/github-actions' |
| 40 | + workload_identity_provider: ${{ secrets.GCP_WORKLOAD_IDENTITY_PROVIDER }} |
41 | 41 | service_account: ${{ secrets.GCP_DEPLOY_SA }} |
42 | 42 |
|
43 | 43 | - name: "Login to GAR" |
@@ -82,24 +82,20 @@ jobs: |
82 | 82 | uses: 'google-github-actions/auth@v2' |
83 | 83 | with: |
84 | 84 | create_credentials_file: true |
85 | | - workload_identity_provider: 'projects/1006240973223/locations/global/workloadIdentityPools/deploy-backstage/providers/github-actions' |
| 85 | + workload_identity_provider: ${{ secrets.GCP_WORKLOAD_IDENTITY_PROVIDER }} |
86 | 86 | service_account: ${{ secrets.GCP_DEPLOY_SA }} |
87 | 87 |
|
88 | | - - id: 'deploy' |
| 88 | + - name: Deploy to Cloud Run |
| 89 | + id: 'deploy' |
89 | 90 | uses: 'google-github-actions/deploy-cloudrun@v2' |
90 | 91 | with: |
91 | 92 | service: ${{ secrets.GCP_CLOUD_RUN_SERVICE }} |
92 | 93 | image: ${{ secrets.GCP_REGION }}-docker.pkg.dev/${{ secrets.GCP_PROJECT_ID }}/${{ secrets.GCP_GAR_REPO }}/backstage-image:${{ github.sha }} |
93 | 94 | region: ${{ secrets.GCP_REGION }} |
94 | | - flags: '--port=7007 --add-cloudsql-instances=code-idp:europe-west10:backstage-pg' |
95 | | - env_vars: | |
96 | | - POSTGRES_HOST=/cloudsql/code-idp:europe-west10:backstage-pg |
97 | | - POSTGRES_PORT=5432 |
98 | | - POSTGRES_USER=postgres |
99 | | - BASE_URL=https://backstage.foundations-software-engineering.com |
| 95 | + flags: '--platform managed --allow-unauthenticated --port=7007' |
100 | 96 | secrets: |- |
101 | | - POSTGRES_PASSWORD=postgres-password:latest |
102 | 97 | GITHUB_TOKEN=github_token:latest |
| 98 | + GITLAB_TOKEN=gitlab_token:latest |
103 | 99 | GOOGLE_CLIENT_ID=google_client_id:latest |
104 | 100 | GOOGLE_CLIENT_SECRET=google_client_secret:latest |
105 | 101 | PROD_GITHUB_CLIENT_SECRET=github_client_secret:latest |
|
0 commit comments