-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
8 additions
and
8 deletions.
There are no files selected for viewing
This file contains 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
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}} | ||
|