diff --git a/.github/workflows/build-pr.yml b/.github/workflows/build-pr.yml index cb178e30f5..aff6872f7c 100644 --- a/.github/workflows/build-pr.yml +++ b/.github/workflows/build-pr.yml @@ -14,37 +14,21 @@ jobs: metadata: runs-on: ubuntu-latest outputs: - submodules: ${{ steps.submodules.outputs.submodules }} - privileged: ${{ steps.submodules.outputs.privileged }} - matrix: ${{ steps.matrix-fork.outputs.matrix || steps.matrix-main.outputs.matrix }} + submodules: ${{ steps.submodules-fork.outputs.submodules || steps.submodules-main.outputs.submodules }} + privileged: ${{ steps.submodules-fork.outputs.privileged || steps.submodules-main.outputs.privileged }} env: ACTIONS_SSH_KEY: ${{ secrets.ACTIONS_SSH_KEY }} steps: - - name: Set matrix for fork - if: env.ACTIONS_SSH_KEY == '' - id: matrix-fork - uses: druzsan/setup-matrix@v2 - with: - matrix: | - repo: [brand, i18n] - - - name: Set matrix for main repo - if: env.ACTIONS_SSH_KEY != '' - id: matrix-main - uses: druzsan/setup-matrix@v2 - with: - matrix: | - repo: [brand, i18n, mkdocs-material-insiders] - - name: Set submodules for fork if: env.ACTIONS_SSH_KEY == '' - id: submodules + id: submodules-fork run: | echo "submodules="[brand, i18n]"" >> "$GITHUB_OUTPUT" echo "privileged=false" >> "$GITHUB_OUTPUT" - name: Set submodules for main repo if: env.ACTIONS_SSH_KEY != '' + id: submodules-main run: | echo "submodules="[brand, i18n, webserver]"" >> "$GITHUB_OUTPUT" echo "privileged=true" >> "$GITHUB_OUTPUT" @@ -64,11 +48,12 @@ jobs: submodule: needs: metadata strategy: - matrix: ${{ fromJson(needs.metadata.outputs.matrix) }} + matrix: + repo: ${{ fromJson(needs.metadata.outputs.submodules) }} uses: privacyguides/.github/.github/workflows/download-repo.yml@main with: repo: ${{ matrix.repo.name }} - privileged: ${{ needs.metadata.outputs.privileged }} + privileged: ${{ fromJSON(needs.metadata.outputs.privileged) }} secrets: ACTIONS_SSH_KEY: ${{ secrets.ACTIONS_SSH_KEY }}