Skip to content

Commit

Permalink
OPSEXP-2257 Dynamic matrix for docker compose testing (#993)
Browse files Browse the repository at this point in the history
  • Loading branch information
gionn authored Aug 24, 2023
1 parent 452a4b7 commit 2bcc2a0
Showing 1 changed file with 18 additions and 8 deletions.
26 changes: 18 additions & 8 deletions .github/workflows/docker-compose-enterprise.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,28 @@ on:
- release/**

jobs:
build_vars:
runs-on: ubuntu-latest
outputs:
matrix_json: ${{ steps.eval.outputs.matrix_json }}
steps:
- uses: actions/checkout@v3
- name: Evaluate Matrix
id: eval
run: >-
echo "matrix_json=$(
ls -1 docker-compose |
grep -P '^\d+' |
jq -Rn '{"compose_file": [inputs]}' |
jq -c '.compose_file += ["docker-compose.yml"]'
)" >> $GITHUB_OUTPUT
compose_enterprise:
name: docker-compose enterprise
needs: build_vars
strategy:
fail-fast: true
matrix:
compose_file:
- docker-compose.yml
- 7.4.N-docker-compose.yml
- 7.3.N-docker-compose.yml
- 7.2.N-docker-compose.yml
- 7.1.N-docker-compose.yml
- 7.0.N-docker-compose.yml
matrix: ${{ fromJSON(needs.build_vars.outputs.matrix_json) }}
runs-on: ubuntu-latest
if: >-
github.event_name == 'push'
Expand Down

0 comments on commit 2bcc2a0

Please sign in to comment.