-
Notifications
You must be signed in to change notification settings - Fork 1
38 lines (36 loc) · 1022 Bytes
/
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
name: Deploy
run-name: >-
${{ github.event_name == 'workflow_dispatch'
&& format('Copilot ({0})', inputs.environment)
|| 'Copilot (All staging environments)' }}
on:
push:
branches: [main]
workflow_dispatch:
inputs:
environment:
description: "Deployment environment"
required: true
type: choice
options:
- qa
- test
- preview
- training
- production
jobs:
Deploy:
strategy:
fail-fast: false
matrix:
environment: >-
${{ fromJSON(github.event_name == 'workflow_dispatch'
&& format('["{0}"]', inputs.environment)
|| '["qa", "test"]') }}
uses: ./.github/workflows/_deploy-template.yml
with:
environment: ${{ matrix.environment }}
aws-account-id: >-
${{ matrix.environment == 'production'
&& 'arn:aws:iam::820242920762:role/GitHubActionsRole'
|| 'arn:aws:iam::393416225559:role/GitHubActionsRole' }}