-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (44 loc) · 1.59 KB
/
just_cloudbuild.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Cloud Build
on:
workflow_call:
inputs:
command:
description: "The justfile + Cloud build-related recipe to run"
required: true
type: string
outputs:
image:
description: "GCR image produced by the command where applicable"
value: ${{ jobs.run_cloudbuild_command.outputs.image }}
jobs:
run_cloudbuild_command:
name: Submit Build
runs-on: ubuntu-latest
permissions:
contents: "read"
id-token: "write"
outputs:
image: ${{ steps.cloudbuild-command.outputs.image }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup just
uses: taiki-e/install-action@v2
with:
tool: just
- name: Authenticate to Google Cloud
uses: google-github-actions/auth@v2
with:
workload_identity_provider: "projects/567739286055/locations/global/workloadIdentityPools/los-verdes-digital-membership/providers/los-verdes-digital-membership"
service_account: "github-deployer@lv-digital-membership.iam.gserviceaccount.com"
access_token_scopes: "https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/sqlservice.admin"
token_format: access_token
access_token_lifetime: 1800s
- name: Set up Cloud SDK
uses: google-github-actions/setup-gcloud@v2
- name: Build
id: cloudbuild-command
run: just ${{ inputs.command }}
- name: Debug image Output
run: |
echo "steps.cloudbuild-command.outputs.image: ${{ steps.cloudbuild-command.outputs.image }}"