diff --git a/.github/workflows/test-dev-container.yaml b/.github/workflows/test-dev-container.yaml index d25224a..399970b 100644 --- a/.github/workflows/test-dev-container.yaml +++ b/.github/workflows/test-dev-container.yaml @@ -6,30 +6,21 @@ on: # rebuild any PRs and main branch changes - develop jobs: - find-jobs: - name: Find Jobs + directories: # Job that list subdirectories runs-on: ubuntu-latest outputs: - folders: ${{ steps.jobs.outputs.folders }} + dir: ${{ steps.set-dirs.outputs.dir }} # generate output name dir by using inner step output steps: - - uses: actions/checkout@v1 - - - id: jobs - uses: philips-labs/list-folder-action@v1 - with: - path: ./templates - - matrix: - name: Matrix Jobs + - 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 + loop: runs-on: ubuntu-latest - needs: [find-jobs] - defaults: - run: - working-directory: ${{ matrix.folder }} + needs: [directories] # Depends on previous job strategy: matrix: - folder: ${{ fromJson(needs.find-jobs.outputs.folders )}} + dir: ${{fromJson(needs.directories.outputs.dir)}} # List matrix strategy from directories dynamically steps: - - name: do something - run: echo ${{ matrix.folder }} + - run: echo ${{matrix.dir}}