Skip to content

Commit cf303b9

Browse files
authored
fix: force update revision name (#24)
* fix: force update revision name * revert some changes * Update revision generation comments * Update test
1 parent 5652d4b commit cf303b9

File tree

8 files changed

+309
-27
lines changed

8 files changed

+309
-27
lines changed

.github/workflows/deploy-cloudrun-credentials-it.yml

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: deploy-cloudrun credentials Integration
1+
name: deploy-cloudrun Credentials Integration
22

33
on:
44
push:
@@ -7,36 +7,40 @@ on:
77

88
jobs:
99
gcloud:
10-
if: ${{ github.event_name == 'push' || github.repository == github.event.pull_request.head.repo.full_name }}
1110
name: with setup-gcloud
11+
if: ${{ github.event_name == 'push' || github.repository == github.event.pull_request.head.repo.full_name }}
1212
runs-on: ubuntu-latest
1313
steps:
1414
- id: service
1515
run: echo ::set-output name=service::run-gcloud-$GITHUB_SHA
1616
- uses: actions/checkout@v2
17-
- uses: google-github-actions/setup-gcloud@master # Set up ADC to make authenticated request to service
18-
with:
19-
service_account_key: ${{ secrets.DEPLOY_CLOUDRUN_SA_KEY_B64 }}
20-
export_default_credentials: true
2117
- uses: actions/setup-node@master
2218
with:
2319
node-version: 12.x
2420
- run: |-
2521
npm install
2622
npm run build
23+
24+
- name: Set up authentication
25+
uses: google-github-actions/setup-gcloud@master
26+
with:
27+
service_account_key: ${{ secrets.DEPLOY_CLOUDRUN_SA_KEY_B64 }}
28+
export_default_credentials: true
29+
2730
- id: deploy
2831
uses: ./
2932
with:
3033
image: gcr.io/cloudrun/hello
3134
service: ${{ steps.service.outputs.service }}
35+
3236
- name: Integration Tests
3337
run: npm run e2e-tests
3438
env:
3539
URL: ${{ steps.deploy.outputs.url }}
3640

3741
b64_json:
42+
name: with base64 creds
3843
if: ${{ github.event_name == 'push' || github.repository == github.event.pull_request.head.repo.full_name }}
39-
name: with base64 json creds
4044
runs-on: ubuntu-latest
4145
steps:
4246
- id: service
@@ -48,24 +52,27 @@ jobs:
4852
- run: |-
4953
npm install
5054
npm run build
55+
5156
- id: deploy
5257
uses: ./
5358
with:
5459
credentials: ${{ secrets.DEPLOY_CLOUDRUN_SA_KEY_B64 }}
5560
image: gcr.io/cloudrun/hello
5661
service: ${{ steps.service.outputs.service }}
62+
5763
- uses: google-github-actions/setup-gcloud@master # Set up ADC to make authenticated request to service
5864
with:
5965
service_account_key: ${{ secrets.DEPLOY_CLOUDRUN_SA_KEY_B64 }}
6066
export_default_credentials: true
67+
6168
- name: Integration Tests
6269
run: npm run e2e-tests
6370
env:
6471
URL: ${{ steps.deploy.outputs.url }}
6572

6673
json:
67-
if: ${{ github.event_name == 'push' || github.repository == github.event.pull_request.head.repo.full_name }}
6874
name: with json creds
75+
if: ${{ github.event_name == 'push' || github.repository == github.event.pull_request.head.repo.full_name }}
6976
runs-on: ubuntu-latest
7077
steps:
7178
- id: service
@@ -77,30 +84,35 @@ jobs:
7784
- run: |-
7885
npm install
7986
npm run build
87+
8088
- id: deploy
8189
uses: ./
8290
with:
8391
credentials: ${{ secrets.DEPLOY_CLOUDRUN_SA_KEY_JSON }}
8492
image: gcr.io/cloudrun/hello
8593
service: ${{ steps.service.outputs.service }}
94+
8695
- uses: google-github-actions/setup-gcloud@master # Set up ADC to make authenticated request to service
8796
with:
8897
service_account_key: ${{ secrets.DEPLOY_CLOUDRUN_SA_KEY_B64 }}
8998
export_default_credentials: true
99+
90100
- name: Integration Tests
91101
run: npm run e2e-tests
92102
env:
93103
URL: ${{ steps.deploy.outputs.url }}
94104

95105
cleanup:
96106
name: Clean Up
107+
if: ${{ always() }}
97108
runs-on: ubuntu-latest
98109
needs: [json, gcloud, b64_json]
99110
steps:
100111
- uses: google-github-actions/setup-gcloud@master
101112
with:
102113
service_account_key: ${{ secrets.DEPLOY_CLOUDRUN_SA_KEY_B64 }}
103114
project_id: ${{ secrets.DEPLOY_CLOUDRUN_PROJECT_ID }}
115+
104116
- name: Delete services
105117
run: |-
106118
gcloud config set run/platform managed

0 commit comments

Comments
 (0)