Skip to content

Commit

Permalink
fine tune build matrix job
Browse files Browse the repository at this point in the history
  • Loading branch information
pmacius committed Nov 5, 2024
1 parent 77a1c6b commit 402deaa
Showing 1 changed file with 10 additions and 21 deletions.
31 changes: 10 additions & 21 deletions .github/workflows/reusuable_build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,30 +131,19 @@ jobs:
runs-on: ubuntu-latest
if: github.actor != 'dependabot[bot]'
outputs:
compose_matrix_json: ${{ steps.compose-values.outputs.compose_matrix_json }}
helm_matrix_json: ${{ steps.helm-values.outputs.helm_matrix_json }}
compose_matrix_json: ${{ steps.set-matrix.outputs.compose_matrix_json }}
helm_matrix_json: ${{ steps.set-matrix.outputs.helm_matrix_json }}
steps:
- name: Calculate values for compose
id: compose-values
- name: Set matrix values for Compose and Helm
id: set-matrix
run: |
if [[ '${{ inputs.acs_version }}' == '23' ]]; then
compose_matrix_json='{"edition": ["enterprise", "community"]}'
elif [[ '${{ inputs.acs_version }}' == '74' ]]; then
compose_matrix_json='{"edition": ["74"]}'
else
compose_matrix_json='{"edition": []}'
fi
echo "compose_matrix_json=$compose_matrix_json" >> $GITHUB_OUTPUT
- name: Calculate values for helm
id: helm-values
run: |
if [[ '${{ inputs.acs_version }}' == '23' ]]; then
helm_matrix_json='{"arch": ["arm64", "amd64"], "edition": ["enterprise", "community"]}'
elif [[ '${{ inputs.acs_version }}' == '74' ]]; then
helm_matrix_json='{"arch": ["amd64"], "edition": ["74"]}'
if [[ "${{ inputs.acs_version }}" == "23" ]]; then
echo 'compose_matrix_json={"edition": ["enterprise", "community"]}' >> $GITHUB_OUTPUT
echo 'helm_matrix_json={"arch": ["arm64", "amd64"], "edition": ["enterprise", "community"]}' >> $GITHUB_OUTPUT
elif [[ "${{ inputs.acs_version }}" == "74" ]]; then
echo 'compose_matrix_json={"edition": ["74"]}' >> $GITHUB_OUTPUT
echo 'helm_matrix_json={"arch": ["amd64"], "edition": ["74"]}' >> $GITHUB_OUTPUT
fi
echo "helm_matrix_json=$helm_matrix_json" >> $GITHUB_OUTPUT
compose-test:
needs: build-matrix
Expand Down

0 comments on commit 402deaa

Please sign in to comment.