Skip to content

Commit cc7e344

Browse files
committed
CI: Only test default deployment.yaml in forks
For concrete instances of the admin guide we don't need to test all permutations, only the actual config.
1 parent c6980a7 commit cc7e344

File tree

1 file changed

+19
-6
lines changed

1 file changed

+19
-6
lines changed

.github/workflows/pull_request.yml

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,29 @@ name: Build OpenStack admin guide
33
on:
44
- pull_request
55
jobs:
6+
# Dynamically define test matrix.
7+
# In openstack-admin-guide CI we want to test various configurations.
8+
# In client admin guide CI we just want to test the actual configuration.
9+
# https://stackoverflow.com/questions/65384420/how-do-i-make-a-github-action-matrix-element-conditional
10+
matrix:
11+
name: Generate test matrix
12+
runs-on: ubuntu-latest
13+
outputs:
14+
matrix: ${{ steps.set-matrix.outputs.matrix }}
15+
steps:
16+
# TODO:
17+
# if ${{ github.repository }} == 'stackhpc/openstack-admin-guide'
18+
- name: Generate test matrix
19+
id: set-matrix
20+
run: |
21+
echo "matrix={\"deployment_yaml\":[\"__default__\",\"disable-ceph\",\"enable-ironic\",\"enable-ironic-no-cleaning-or-physnet\"]}" >> $GITHUB_OUTPUT
22+
623
build:
724
name: Build OpenStack admin guide
25+
needs: matrix
826
runs-on: ubuntu-latest
927
strategy:
10-
matrix:
11-
deployment_yaml:
12-
- __default__
13-
- disable-ceph
14-
- enable-ironic
15-
- enable-ironic-no-cleaning-or-physnet
28+
matrix: ${{ fromJson(needs.matrix.outputs.matrix) }}
1629
steps:
1730
- uses: actions/checkout@v3
1831

0 commit comments

Comments
 (0)