-
Notifications
You must be signed in to change notification settings - Fork 0
80 lines (72 loc) · 2.21 KB
/
release.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: Release Events
on:
release:
types: [published]
permissions:
id-token: write
deployments: write
jobs:
deploy-dev:
name: Deploy to Dev
runs-on: ubuntu-latest
if: github.event.release.prerelease == true
environment:
name: dev
steps:
- name: 🚢 Deploy
uses: agrc/cloud-run-docker-deploy-composite-action@v2
with:
identity-provider: ${{ secrets.IDENTITY_PROVIDER }}
service-account-email: ${{ secrets.SERVICE_ACCOUNT_EMAIL }}
project-id: ${{ secrets.PROJECT_ID }}
service: masquerade
flags: |
--cpu=1
--memory=128Mi
--min-instances=0
--max-instances=5
--timeout=60
--allow-unauthenticated
env-vars: WEB_API_KEY=${{ secrets.WEB_API_KEY }}
deploy-prod:
name: Deploy to Production
runs-on: ubuntu-latest
if: github.event.release.prerelease == false
environment:
name: prod
steps:
- name: 🚢 Deploy
uses: agrc/cloud-run-docker-deploy-composite-action@v2
with:
identity-provider: ${{ secrets.IDENTITY_PROVIDER }}
service-account-email: ${{ secrets.SERVICE_ACCOUNT_EMAIL }}
project-id: ${{ secrets.PROJECT_ID }}
service: masquerade
flags: |
--concurrency=100
--cpu=1
--max-instances=10
--memory=128Mi
--min-instances=1
--timeout=60
--allow-unauthenticated
env-vars: WEB_API_KEY=${{ secrets.WEB_API_KEY }}
service-now-instance: ${{ secrets.SN_INSTANCE }}
service-now-table: ${{ secrets.SN_TABLE }}
service-now-system-id: ${{ secrets.SN_SYS_ID }}
service-now-username: ${{ secrets.SN_USERNAME }}
service-now-password: ${{ secrets.SN_PASSWORD }}
repo-token: ${{ secrets.GITHUB_TOKEN }}
notify:
name: Notifications
needs: deploy-prod
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
issues: write
steps:
- name: Release Notifier
uses: agrc/release-issue-notifications-action@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}