-
Notifications
You must be signed in to change notification settings - Fork 9
63 lines (59 loc) · 2 KB
/
deploy.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
name: Deploy
permissions:
id-token: write # This is required for requesting the JWT
contents: read # This is required for actions/checkout
pull-requests: write # This is required to add comments to Pull Requests
deployments: write # This is required to deactivate deployments
on:
workflow_dispatch:
pull_request:
paths:
- "**.tf*"
- ".github/workflows/deploy.yml"
push:
branches:
- "main"
paths:
- "**.tf*"
- ".github/workflows/deploy.yml"
concurrency:
group: ${{ github.ref }}
cancel-in-progress: false
jobs:
deploy-dev:
name: Dev Deployment
uses: aws-samples/aws-terraform-reusable-workflow/.github/workflows/[email protected]
with:
deploy: true
tf-version: ${{ vars.TF_VERSION }}
tf-organization: ${{ vars.TF_ORGANIZATION }}
tf-hostname: ${{ vars.TF_HOSTNAME }}
tf-workspace: ${{ vars.APP_NAME }}-dev
aws-region: "us-west-2"
environment: "dev"
ref: v1.2.0
local-execution-mode: true
secrets:
tf-token: ${{ secrets.TF_TOKEN }}
terraform-execution-iam-plan-role-arn: ${{ secrets.DEV_AWS_PLAN_ROLE_ARN }}
terraform-execution-iam-apply-role-arn: ${{ secrets.DEV_AWS_APPLY_ROLE_ARN }}
extra-args: ${{ secrets.DEV_EXTRA_ARGS }}
deploy-test:
needs: deploy-dev
name: Test Deployment
uses: aws-samples/aws-terraform-reusable-workflow/.github/workflows/[email protected]
with:
deploy: true
tf-version: ${{ vars.TF_VERSION }}
tf-organization: ${{ vars.TF_ORGANIZATION }}
tf-hostname: ${{ vars.TF_HOSTNAME }}
tf-workspace: ${{ vars.APP_NAME }}-test
aws-region: "us-west-2"
environment: "test"
ref: v1.2.0
local-execution-mode: true
secrets:
tf-token: ${{ secrets.TF_TOKEN }}
terraform-execution-iam-plan-role-arn: ${{ secrets.TEST_AWS_PLAN_ROLE_ARN }}
terraform-execution-iam-apply-role-arn: ${{ secrets.TEST_AWS_APPLY_ROLE_ARN }}
extra-args: ${{ secrets.TEST_EXTRA_ARGS }}