Skip to content

test dynamic matrices #1

test dynamic matrices

test dynamic matrices #1

Workflow file for this run

name: Dynamic Matrices
on:
push:
pull_request:
types: [ assigned, opened, synchronize, reopened, edited ]
workflow_dispatch:
jobs:
prepare:
runs-on: ubuntu-20.04
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- uses: actions/checkout@v4
with:
sparse-checkout: |
pom.xml
sparse-checkout-cone-mode: false
- id: set-matrix
run: |
slack_pl_version=$(cat ./pom.xml | grep -oE -m 1 '<version>[0-9][0-9]?\.[0-9]+\.[0-9]+</version>' | grep -oE '[0-9]\.[0-9]+\.[0-9]+')
echo "Slack Plugin Version $slack_pl_version"
echo "matrix={\"java-version\":[\"8\",\"11\",\"17\"],\"bitbucket-version\":[\"7.6.0\",\"8.8.0\"],\"exclude\":[{\"java-version\":\"17\",\"bitbucket-version\":\"7.6.0\"}]}" >> $GITHUB_OUTPUT
run-tests:
needs: prepare
runs-on: ubuntu-20.04
strategy:
matrix: ${{ fromJSON(needs.prepare.outputs.matrix) }}
fail-fast: false
steps:
- run: echo "Matrix - Java ${{ matrix.java-version }}, Bitbucket ${{ matrix.bitbucket-version }}"