Skip to content

Commit

Permalink
test dynamic matrices
Browse files Browse the repository at this point in the history
  • Loading branch information
Yevhen Hrytsai committed May 10, 2024
1 parent a7b381f commit 1638694
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/dyn-matrices.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
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 }}"

0 comments on commit 1638694

Please sign in to comment.