This repository was archived by the owner on Apr 17, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 22
Expand file tree
/
Copy pathgithub.yml
More file actions
47 lines (36 loc) · 1.35 KB
/
github.yml
File metadata and controls
47 lines (36 loc) · 1.35 KB
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
# This is a basic workflow to help you get started with Actions
name: CI
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the "main" branch
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
WORKLOAD_IDENTITY_PROVIDER: ${{ secrets.WORKLOAD_IDENTITY_PROVIDER }}
SERVICE_ACCOUNT: ${{ secrets.DEV_SERVICE_ACCOUNT }}
PROJECT_ID: ${{ secrets.PROJECT_ID }}
LOCATION: ${{ secrets.LOCATION }}
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
job_id:
runs-on: 'ubuntu-latest'
permissions:
contents: 'read'
id-token: 'write'
steps:
- uses: 'actions/checkout@v4'
- id: 'auth'
uses: 'google-github-actions/auth@v2'
with:
workload_identity_provider: ${{ env.WORKLOAD_IDENTITY_PROVIDER }}
service_account: ${{ env.SERVICE_ACCOUNT }}
- id: 'SetupCloudSDK'
uses: 'google-github-actions/setup-gcloud@v2'
with:
version: '>= 363.0.0'
- id: 'list-all-files'
run: 'ls -ltrh'
- id : 'Infrastructure-Manager-Deployment'
run: 'gcloud infra-manager deployments apply projects/${{ env.PROJECT_ID }}/locations/${{ env.LOCATION }}/deployments/inframanager --service-account ${{ env.SERVICE_ACCOUNT }} --local-source="."'