Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
npv2k1 committed Feb 2, 2024
1 parent b78a02e commit ea56194
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/test-dev-container.yaml
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
name: 'Test dev container'
on: # rebuild any PRs and main branch changes
on:
pull_request:
push:
branches:
- develop

jobs:
directories: # Job that list subdirectories
directories:
runs-on: ubuntu-latest
outputs:
dir: ${{ steps.set-dirs.outputs.dir }} # generate output name dir by using inner step output
dir: ${{ steps.set-dirs.outputs.dir }}
steps:
- uses: actions/checkout@v2
- id: set-dirs # Give it an id to handle to get step outputs in the outputs key above
run: echo "::set-output name=dir::$(ls -d */ | jq -R -s -c 'split("\n")[:-1]')"
# Define step output named dir base on ls command transformed to JSON thanks to jq
- id: set-dirs
run: echo "dir::$(ls -d */ | jq -R -s -c 'split("\n")[:-1]')" >> "$GITHUB_OUTPUT"

loop:
runs-on: ubuntu-latest
needs: [directories] # Depends on previous job
needs: [directories]
strategy:
matrix:
dir: ${{fromJson(needs.directories.outputs.dir)}} # List matrix strategy from directories dynamically
dir: ${{fromJson(needs.directories.outputs.dir)}}
steps:
- run: echo ${{matrix.dir}}

0 comments on commit ea56194

Please sign in to comment.