-
Notifications
You must be signed in to change notification settings - Fork 6
53 lines (48 loc) · 1.61 KB
/
api_mainnet.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
52
53
# Deploys API to mainnet if attempting to merge to main. Will only trigger if
# a change happened in the api directory, the PR was closed and successfully
# merged to main. There is no `merged to specific branch` event, so we make
# these three checks to make up for it.
name: API Mainnet
on:
push:
branches:
- main
paths:
- 'packages/api/**'
pull_request:
branches:
- main
types:
- closed
paths:
- 'packages/api/**'
jobs:
deploy_api:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
permissions:
contents: 'read'
id-token: 'write'
steps:
- uses: 'actions/checkout@v3'
- id: 'auth'
uses: 'google-github-actions/[email protected]'
with:
workload_identity_provider: 'projects/803405501117/locations/global/workloadIdentityPools/automation-pool/providers/automation-provider'
service_account: '[email protected]'
- id: 'deploy-api'
uses: 'google-github-actions/[email protected]'
with:
deliverables: 'packages/api/app.mainnet.api.yaml'
- id: 'deploy-indexer'
uses: 'google-github-actions/[email protected]'
with:
deliverables: 'packages/api/app.mainnet.indexer.yaml'
- id: 'deploy-game'
uses: 'google-github-actions/[email protected]'
with:
deliverables: 'packages/api/app.mainnet.game.yaml'
- id: 'deploy-jobs'
uses: 'google-github-actions/[email protected]'
with:
deliverables: 'packages/api/app.mainnet.jobs.yaml'