-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (33 loc) · 1.11 KB
/
dispatch-deploy-leaf-stack.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
name: Dispatch - Deploy Leaf Stack
on:
workflow_dispatch:
inputs:
environment:
description: "The leaf stack to Deploy"
type: environment
required: true
env:
EXAMPLES_PATH: ./Examples # No trailing slash plz!
jobs:
cdk-deploy-leaf:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
environment: "${{ inputs.environment }}"
steps:
- uses: actions/checkout@v4
## Install Everything / Setup Env Vars:
- name: Setup CDK
uses: ./.github/workflows/composite-setup-cdk
with:
secrets: ${{ toJson(secrets) }}
vars: ${{ toJson(vars) }}
## Deploy the Leaf Stack:
# CONTAINER_ID: If not defined in Environment, default to everything before the first period in the filename.
- name: "Deploying: ${{ inputs.environment }}"
run: |
CONTAINER_ID=${CONTAINER_ID:=$(echo "${{ inputs.environment }}" | sed 's/\..*//i')}
make cdk-deploy-leaf \
config-file="${{ env.EXAMPLES_PATH }}/${{ inputs.environment }}" \
container-id=${CONTAINER_ID}