Skip to content

Done with re-write, moving config back to where it was #13

Done with re-write, moving config back to where it was

Done with re-write, moving config back to where it was #13

name: cdk-synth
on:
push:
paths:
# Any code in ContainerManager:
- 'ContainerManager/**'
- 'app.py'
# This action:
- '.github/workflows/cdk-synth-examples.yml'
# Example Configs:
- 'Examples/**'
- 'base-stack-config.yaml'
# Except any readme's / documentation:
- '!**README.md'
pull_request:
paths:
# Any code in ContainerManager:
- 'ContainerManager/**'
- 'app.py'
# This action:
- '.github/workflows/cdk-synth-examples.yml'
# Example Configs:
- 'Examples/**'
- 'base-stack-config.yaml'
# Except any readme's / documentation:
- '!**README.md'
jobs:
setup-matrix:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.setup-matrix.outputs.example-config-files }}
steps:
- uses: actions/checkout@v4
- name: Setup matrix
id: setup-matrix
run: |
file_list=$(find ./Examples/ -regextype egrep -regex '.*ya?ml$')
json_list=$(echo $file_list | jq --raw-input --compact-output 'split(" ")')
echo "example-config-files=$json_list" >> "$GITHUB_OUTPUT"
cdk-synth-examples:
runs-on: ubuntu-latest
needs:
- setup-matrix
strategy:
matrix:
example-config: ${{ fromJson(needs.setup-matrix.outputs.matrix) }}
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: ./.github/workflows/composite-setup-python
- name: Install CDK
run: npm install -g aws-cdk
- name: Synthesize CDK Examples
run: make cdk-synth config-file="${{ matrix.example-config }}"