Skip to content

Improve CI scalability #18

Improve CI scalability

Improve CI scalability #18

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: define-matrix

Check failure on line 32 in .github/workflows/test-check.yml

View workflow run for this annotation

GitHub Actions / Get Root Directories of Changed Files

Invalid workflow file

The workflow is not valid. .github/workflows/test-check.yml (Line: 32, Col: 12): Job 'produce-artifacts' depends on unknown job 'define-matrix'.
strategy:
matrix:
color: ${{ fromJSON(needs.get-root-directories.outputs.changed_services) }}
steps:
- name: Define Color
env:
color: ${{ matrix.color }}
run: |
echo "$color"