diff --git a/.github/workflows/matrix-concurrency-external.yml b/.github/workflows/matrix-concurrency-external.yml new file mode 100644 index 0000000..f678b2e --- /dev/null +++ b/.github/workflows/matrix-concurrency-external.yml @@ -0,0 +1,19 @@ +name: MatrixConcurrencyExternal + +on: + pull_request: + types: [closed] + branches: [main] + workflow_dispatch: + +jobs: + pre-matrix-job: + name: Pre Matrix + concurrency: matrix_concurrency_external_${{ github.event.pull_request.number }} + runs-on: ubuntu-latest + steps: + - name: Do some stuff outside the matrix + run: | + echo "Do some stuff $(date +%T)" + sleep 30 + echo "Done some stuff $(date +%T)" diff --git a/.github/workflows/matrix-concurrency.yml b/.github/workflows/matrix-concurrency.yml new file mode 100644 index 0000000..cc0fafa --- /dev/null +++ b/.github/workflows/matrix-concurrency.yml @@ -0,0 +1,32 @@ +name: MatrixConcurrency +concurrency: matrix_concurrency_${{ github.ref_name }} + +on: + pull_request: + workflow_dispatch: + +jobs: + pre-matrix-job: + name: Pre Matrix + concurrency: matrix_concurrency_external_${{ github.event.pull_request.number }} + runs-on: ubuntu-latest + steps: + - name: Do some stuff in outside the matrix + run: | + echo "Do some stuff $(date +%T)" + sleep 30 + echo "Done some stuff $(date +%T)" + + matrix-job: + name: Matrix Concurrency + runs-on: ubuntu-latest + strategy: + matrix: + environment: [qa,staging,production,sandbox] + max-parallel: 1 + steps: + - name: Do some stuff in ${{ matrix.environment }} + run: | + echo "Do some stuff $(date +%T)" + sleep 30 + echo "Done some stuff $(date +%T)" diff --git a/.github/workflows/pwsh-switch-parameter.yml b/.github/workflows/pwsh-switch-parameter.yml index d9c2e8d..9069413 100644 --- a/.github/workflows/pwsh-switch-parameter.yml +++ b/.github/workflows/pwsh-switch-parameter.yml @@ -1,7 +1,6 @@ name: PowerShellSwitchParameter on: - pull_request: workflow_dispatch: jobs: