Skip to content

Improve CI scalability #19

Improve CI scalability

Improve CI scalability #19

Workflow file for this run

name: Get Root Directories of Changed Files
on:
pull_request:
branches: [ master ]
jobs:
get-root-directories:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v45
with:
dir_names: true
dir_names_max_depth: '1'
- name: List all changed files
env:
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
run: |
CHANGED_SERVICES=()
for file in ${ALL_CHANGED_FILES}; do
if [ -e "$file/infra/Pulumi.yaml" ]; then
CHANGED_SERVICES+=("$file")
fi
done
echo "changed_services=${CHANGED_SERVICES[@]}" >> "$GITHUB_OUTPUT"
produce-artifacts:
runs-on: ubuntu-latest
needs: get-root-directories
strategy:
matrix:
color: ${{ fromJSON(needs.get-root-directories.outputs.changed_services) }}
steps:
- name: Define Color
env:
color: ${{ matrix.color }}
run: |
echo "$color"