OPSEXP-2257 Dynamic matrix for docker compose testing #371
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: Docker Compose (Enterprise) | |
on: | |
pull_request: | |
branches: | |
- master | |
- release/** | |
paths: | |
- "! docker-compose/community-docker-compose.yml" | |
- docker-compose/** | |
- test/postman/docker-compose/** | |
- .github/workflows/docker-compose-enterprise.yml | |
push: | |
branches: | |
- master | |
- release/** | |
jobs: | |
build_vars: | |
runs-on: ubuntu-latest | |
outputs: | |
matrix_json: ${{ steps.setup.outputs.matrix_json }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Evaluate Matrix | |
id: setup | |
run: >- | |
echo "matrix_json=$(ls -1 docker-compose | | |
grep -E '^\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: ${{ fromJSON(needs.build_vars.outputs.matrix_json) }} | |
runs-on: ubuntu-latest | |
if: >- | |
github.event_name == 'push' | |
|| ( | |
! github.event.pull_request.head.repo.fork | |
&& github.event.pull_request.head.user.login == 'Alfresco' | |
) | |
steps: | |
- uses: >- | |
Alfresco/alfresco-build-tools/.github/actions/dbp-charts/[email protected] | |
with: | |
compose_file_path: docker-compose/${{ matrix.compose_file }} | |
quay_username: ${{ secrets.QUAY_USERNAME }} | |
quay_password: ${{ secrets.QUAY_PASSWORD }} |