-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (56 loc) · 1.59 KB
/
deploy.yaml
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
name: Deploy
permissions:
id-token: write
contents: read
on:
workflow_dispatch:
inputs:
environment:
description: Environment to deploy to
type: environment
required: true
aws-region:
description: AWS region to deploy to
type: string
required: false
default: us-west-2
workflow_call:
inputs:
environment:
type: string
required: true
aws-region:
type: string
required: false
default: us-west-2
jobs:
deploy:
runs-on: ubuntu-latest
environment: ${{ inputs.environment }}
name: Deploy to ${{ inputs.environment }} 🚀
env:
AWS_REGION: ${{ inputs.aws-region || vars.AWS_REGION }}
VPC_ID: ${{ vars.VPC_ID }}
STAGE: ${{ vars.STAGE }}
PERMISSIONS_BOUNDARY_ARN: ${{ vars.PERMISSIONS_BOUNDARY_ARN }}
PROJECT_NAME: ${{ vars.PROJECT_NAME }}
HONEYCOMB_API_KEY: ${{ secrets.HONEYCOMB_API_KEY }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
cache: "pip"
- run: pip install -r requirements.txt
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
role-to-assume: ${{ vars.DEPLOYMENT_ROLE_ARN }}
role-session-name: ${{ github.actor }}
aws-region: ${{ env.AWS_REGION }}
- name: Deploy
run: |
npx cdk deploy GHGC-grafana-${{ vars.STAGE }} \
--require-approval never