Skip to content

Commit ee6cc75

Browse files
authored
Merge branch 'main' into textgen-0512
2 parents 58f7a43 + 78eb8da commit ee6cc75

File tree

4 files changed

+62
-28
lines changed

4 files changed

+62
-28
lines changed

.github/workflows/custard-ci-dev.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
4141
with:
4242
repository: GoogleCloudPlatform/cloud-samples-tools
43-
ref: v0.2.5
43+
ref: v0.3.2
4444
path: cloud-samples-tools
4545
- name: Create `bin` directory for cloud-samples-tools binaries
4646
run: mkdir bin

.github/workflows/custard-ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
4242
with:
4343
repository: GoogleCloudPlatform/cloud-samples-tools
44-
ref: v0.2.5
44+
ref: v0.3.2
4545
path: cloud-samples-tools
4646
- name: Create `bin` directory for cloud-samples-tools binaries
4747
run: mkdir bin

.github/workflows/custard-run-dev.yaml

Lines changed: 27 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ on:
4545

4646
jobs:
4747
affected:
48-
uses: GoogleCloudPlatform/cloud-samples-tools/.github/workflows/affected.yaml@34b34881006f34d210c4af9d0f7ba9b2d681621d # v0.2.5
48+
uses: GoogleCloudPlatform/cloud-samples-tools/.github/workflows/affected.yaml@9ee708234e240605d96e78f652c333ed6aa95a23 # v0.3.2
4949
permissions:
5050
statuses: write
5151
with:
@@ -70,26 +70,39 @@ jobs:
7070
continue-on-error: true
7171
env:
7272
GOOGLE_SAMPLES_PROJECT: long-door-651
73-
GOOGLE_SERVICE_ACCOUNT: [email protected]
73+
SERVICE_ACCOUNT: [email protected]
7474
steps:
7575
- name: Check queued
76-
uses: GoogleCloudPlatform/cloud-samples-tools/actions/steps/create-check@34b34881006f34d210c4af9d0f7ba9b2d681621d # v0.2.5
76+
uses: GoogleCloudPlatform/cloud-samples-tools/actions/steps/create-check@9ee708234e240605d96e78f652c333ed6aa95a23 # v0.3.2
7777
id: queued
7878
with:
7979
sha: ${{ github.event.workflow_run.head_sha || inputs.ref || github.sha }}
8080
name: (experimental / dev) Custard CI / ${{ github.job }} (${{ matrix.path }})
8181
job-name: ${{ github.job }} (${{ matrix.path }})
8282
if: ${{ !!github.event.workflow_run }}
83+
- name: Checkout
84+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
85+
with:
86+
ref: ${{ github.event.workflow_run.head_sha || inputs.ref || github.sha }}
87+
- name: Authenticate
88+
uses: google-github-actions/auth@ba79af03959ebeac9769e648f473a284504d9193 # v2.1.10
89+
id: auth
90+
with:
91+
project_id: ${{ env.GOOGLE_SAMPLES_PROJECT }}
92+
workload_identity_provider: projects/1046198160504/locations/global/workloadIdentityPools/github-actions-pool/providers/github-actions-provider
93+
service_account: ${{ env.SERVICE_ACCOUNT }}
94+
access_token_lifetime: 600s # 10 minutes
95+
token_format: id_token
96+
id_token_audience: https://action.test/ # service must have this custom audience
97+
id_token_include_email: true
8398
- name: Setup Custard
84-
uses: GoogleCloudPlatform/cloud-samples-tools/actions/steps/setup-custard@34b34881006f34d210c4af9d0f7ba9b2d681621d # v0.2.5
99+
uses: GoogleCloudPlatform/cloud-samples-tools/actions/steps/setup-custard@9ee708234e240605d96e78f652c333ed6aa95a23 # v0.3.2
85100
with:
86101
path: ${{ matrix.path }}
87102
ci-setup: ${{ toJson(fromJson(needs.affected.outputs.ci-setups)[matrix.path]) }}
88-
project-id: ${{ env.GOOGLE_SAMPLES_PROJECT }}
89-
workload-identity-provider: projects/1046198160504/locations/global/workloadIdentityPools/github-actions-pool/providers/github-actions-provider
90-
service-account: ${{ env.GOOGLE_SERVICE_ACCOUNT }}
103+
id-token: ${{ steps.auth.outputs.id_token }}
91104
- name: Check in_progress
92-
uses: GoogleCloudPlatform/cloud-samples-tools/actions/steps/update-check@34b34881006f34d210c4af9d0f7ba9b2d681621d # v0.2.5
105+
uses: GoogleCloudPlatform/cloud-samples-tools/actions/steps/update-check@9ee708234e240605d96e78f652c333ed6aa95a23 # v0.3.2
93106
id: in_progress
94107
with:
95108
check: ${{ steps.queued.outputs.check }}
@@ -98,13 +111,16 @@ jobs:
98111
run: |
99112
timeout ${{ fromJson(needs.affected.outputs.ci-setups)[matrix.path].timeout-minutes }}m \
100113
make test dir=${{ matrix.path }}
114+
env:
115+
# TODO: remove this when the self-contained runner lands.
116+
SERVICE_ACCOUNT: [email protected]
101117
- name: Check success
102-
uses: GoogleCloudPlatform/cloud-samples-tools/actions/steps/update-check@34b34881006f34d210c4af9d0f7ba9b2d681621d # v0.2.5
118+
uses: GoogleCloudPlatform/cloud-samples-tools/actions/steps/update-check@9ee708234e240605d96e78f652c333ed6aa95a23 # v0.3.2
103119
with:
104120
check: ${{ steps.in_progress.outputs.check }}
105121
status: success
106122
- name: Check failure
107-
uses: GoogleCloudPlatform/cloud-samples-tools/actions/steps/update-check@34b34881006f34d210c4af9d0f7ba9b2d681621d # v0.2.5
123+
uses: GoogleCloudPlatform/cloud-samples-tools/actions/steps/update-check@9ee708234e240605d96e78f652c333ed6aa95a23 # v0.3.2
108124
if: failure()
109125
with:
110126
check: ${{ steps.in_progress.outputs.check }}
@@ -118,7 +134,7 @@ jobs:
118134
statuses: write
119135
steps:
120136
- name: Check success
121-
uses: GoogleCloudPlatform/cloud-samples-tools/actions/steps/update-check@34b34881006f34d210c4af9d0f7ba9b2d681621d # v0.2.5
137+
uses: GoogleCloudPlatform/cloud-samples-tools/actions/steps/update-check@9ee708234e240605d96e78f652c333ed6aa95a23 # v0.3.2
122138
with:
123139
check: ${{ needs.affected.outputs.check }}
124140
status: success

.github/workflows/custard-run.yaml

Lines changed: 33 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ on:
5050

5151
jobs:
5252
affected:
53-
uses: GoogleCloudPlatform/cloud-samples-tools/.github/workflows/affected.yaml@34b34881006f34d210c4af9d0f7ba9b2d681621d # v0.2.5
53+
uses: GoogleCloudPlatform/cloud-samples-tools/.github/workflows/affected.yaml@9ee708234e240605d96e78f652c333ed6aa95a23 # v0.3.2
5454
permissions:
5555
statuses: write
5656
with:
@@ -68,7 +68,7 @@ jobs:
6868
timeout-minutes: 5
6969
steps:
7070
- name: Check in_progress
71-
uses: GoogleCloudPlatform/cloud-samples-tools/actions/steps/create-check@34b34881006f34d210c4af9d0f7ba9b2d681621d # v0.2.5
71+
uses: GoogleCloudPlatform/cloud-samples-tools/actions/steps/create-check@9ee708234e240605d96e78f652c333ed6aa95a23 # v0.3.2
7272
id: in_progress
7373
with:
7474
sha: ${{ github.event.workflow_run.head_sha || inputs.ref || github.sha }}
@@ -77,23 +77,25 @@ jobs:
7777
if: ${{ !!github.event.workflow_run }}
7878
- name: Checkout
7979
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
80+
with:
81+
ref: ${{ github.event.workflow_run.head_sha || inputs.ref || github.sha }}
8082
- name: Setup Node
8183
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
8284
with:
8385
node-version: 20
8486
- run: npm install
8587
- name: npx gtx lint (${{ needs.affected.outputs.num-paths }} packages)
86-
uses: GoogleCloudPlatform/cloud-samples-tools/actions/steps/map-run@34b34881006f34d210c4af9d0f7ba9b2d681621d # v0.2.5
88+
uses: GoogleCloudPlatform/cloud-samples-tools/actions/steps/map-run@9ee708234e240605d96e78f652c333ed6aa95a23 # v0.3.2
8789
with:
8890
command: npx gts lint
8991
paths: ${{ needs.affected.outputs.paths }}
9092
- name: Check success
91-
uses: GoogleCloudPlatform/cloud-samples-tools/actions/steps/update-check@34b34881006f34d210c4af9d0f7ba9b2d681621d # v0.2.5
93+
uses: GoogleCloudPlatform/cloud-samples-tools/actions/steps/update-check@9ee708234e240605d96e78f652c333ed6aa95a23 # v0.3.2
9294
with:
9395
check: ${{ steps.in_progress.outputs.check }}
9496
status: success
9597
- name: Check failure
96-
uses: GoogleCloudPlatform/cloud-samples-tools/actions/steps/update-check@34b34881006f34d210c4af9d0f7ba9b2d681621d # v0.2.5
98+
uses: GoogleCloudPlatform/cloud-samples-tools/actions/steps/update-check@9ee708234e240605d96e78f652c333ed6aa95a23 # v0.3.2
9799
if: failure()
98100
with:
99101
check: ${{ steps.in_progress.outputs.check }}
@@ -114,26 +116,39 @@ jobs:
114116
continue-on-error: true
115117
env:
116118
GOOGLE_SAMPLES_PROJECT: long-door-651
117-
GOOGLE_SERVICE_ACCOUNT: [email protected]
119+
SERVICE_ACCOUNT: [email protected]
118120
steps:
119121
- name: Check queued
120-
uses: GoogleCloudPlatform/cloud-samples-tools/actions/steps/create-check@34b34881006f34d210c4af9d0f7ba9b2d681621d # v0.2.5
122+
uses: GoogleCloudPlatform/cloud-samples-tools/actions/steps/create-check@9ee708234e240605d96e78f652c333ed6aa95a23 # v0.3.2
121123
id: queued
122124
with:
123125
sha: ${{ github.event.workflow_run.head_sha || inputs.ref || github.sha }}
124126
name: (experimental) Custard CI / ${{ github.job }} (${{ matrix.path }})
125127
job-name: ${{ github.job }} (${{ matrix.path }})
126128
if: ${{ !!github.event.workflow_run }}
129+
- name: Checkout
130+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
131+
with:
132+
ref: ${{ github.event.workflow_run.head_sha || inputs.ref || github.sha }}
133+
- name: Authenticate
134+
uses: google-github-actions/auth@ba79af03959ebeac9769e648f473a284504d9193 # v2.1.10
135+
id: auth
136+
with:
137+
project_id: ${{ env.GOOGLE_SAMPLES_PROJECT }}
138+
workload_identity_provider: projects/1046198160504/locations/global/workloadIdentityPools/github-actions-pool/providers/github-actions-provider
139+
service_account: ${{ env.SERVICE_ACCOUNT }}
140+
access_token_lifetime: 600s # 10 minutes
141+
token_format: id_token
142+
id_token_audience: https://action.test/ # service must have this custom audience
143+
id_token_include_email: true
127144
- name: Setup Custard
128-
uses: GoogleCloudPlatform/cloud-samples-tools/actions/steps/setup-custard@34b34881006f34d210c4af9d0f7ba9b2d681621d # v0.2.5
145+
uses: GoogleCloudPlatform/cloud-samples-tools/actions/steps/setup-custard@9ee708234e240605d96e78f652c333ed6aa95a23 # v0.3.2
129146
with:
130147
path: ${{ matrix.path }}
131148
ci-setup: ${{ toJson(fromJson(needs.affected.outputs.ci-setups)[matrix.path]) }}
132-
project-id: ${{ env.GOOGLE_SAMPLES_PROJECT }}
133-
workload-identity-provider: projects/1046198160504/locations/global/workloadIdentityPools/github-actions-pool/providers/github-actions-provider
134-
service-account: ${{ env.GOOGLE_SERVICE_ACCOUNT }}
149+
id-token: ${{ steps.auth.outputs.id_token }}
135150
- name: Check in_progress
136-
uses: GoogleCloudPlatform/cloud-samples-tools/actions/steps/update-check@34b34881006f34d210c4af9d0f7ba9b2d681621d # v0.2.5
151+
uses: GoogleCloudPlatform/cloud-samples-tools/actions/steps/update-check@9ee708234e240605d96e78f652c333ed6aa95a23 # v0.3.2
137152
id: in_progress
138153
with:
139154
check: ${{ steps.queued.outputs.check }}
@@ -142,13 +157,16 @@ jobs:
142157
run: |
143158
timeout ${{ fromJson(needs.affected.outputs.ci-setups)[matrix.path].timeout-minutes }}m \
144159
make test dir=${{ matrix.path }}
160+
env:
161+
# TODO: remove this when the self-contained runner lands.
162+
SERVICE_ACCOUNT: [email protected]
145163
- name: Check success
146-
uses: GoogleCloudPlatform/cloud-samples-tools/actions/steps/update-check@34b34881006f34d210c4af9d0f7ba9b2d681621d # v0.2.5
164+
uses: GoogleCloudPlatform/cloud-samples-tools/actions/steps/update-check@9ee708234e240605d96e78f652c333ed6aa95a23 # v0.3.2
147165
with:
148166
check: ${{ steps.in_progress.outputs.check }}
149167
status: success
150168
- name: Check failure
151-
uses: GoogleCloudPlatform/cloud-samples-tools/actions/steps/update-check@34b34881006f34d210c4af9d0f7ba9b2d681621d # v0.2.5
169+
uses: GoogleCloudPlatform/cloud-samples-tools/actions/steps/update-check@9ee708234e240605d96e78f652c333ed6aa95a23 # v0.3.2
152170
if: failure()
153171
with:
154172
check: ${{ steps.in_progress.outputs.check }}
@@ -162,7 +180,7 @@ jobs:
162180
statuses: write
163181
steps:
164182
- name: Check success
165-
uses: GoogleCloudPlatform/cloud-samples-tools/actions/steps/update-check@34b34881006f34d210c4af9d0f7ba9b2d681621d # v0.2.5
183+
uses: GoogleCloudPlatform/cloud-samples-tools/actions/steps/update-check@9ee708234e240605d96e78f652c333ed6aa95a23 # v0.3.2
166184
with:
167185
check: ${{ needs.affected.outputs.check }}
168186
status: success

0 commit comments

Comments
 (0)