Improve CI scalability #1
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Get Root Directories of Changed Files | ||
| on: | ||
| pull_request: | ||
| branches: [ master ] | ||
| jobs: | ||
| get-root-directories: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v3 | ||
| - name: Get Root Directories | ||
| id: get_root_directories | ||
| run: | | ||
| git diff --name-only origin/main -- $(git rev-parse --abbrev-ref HEAD) | while IFS= read -r file; do | ||
| dir=$(dirname "$file") | ||
| root_dir=$(cd "$dir"; cd -; pwd) | ||
| echo "::set-output name=root_directories::$root_dir" | ||
| done | ||
| print-root-directories: | ||
| runs-on: ubuntu-latest | ||
| needs: get-root-directories | ||
| steps: | ||
| - name: Print Root Directories | ||
| run: | | ||
|
Check failure on line 26 in .github/workflows/test-check.yml
|
||
| echo "Root directories:" | ||
| for root_dir in ${{ jobs.get-root-directories.outputs.root_directories.split(',') }}; do | ||
| echo " - $root_dir" | ||
| done | ||