Skip to content

Commit 48bb449

Browse files
committed
Use elif instead of a lot of 'if .. else ...fi' blocks
Signed-off-by: Petr "Stone" Hracek <phracek@redhat.com>
1 parent 75907d1 commit 48bb449

1 file changed

Lines changed: 24 additions & 31 deletions

File tree

.github/workflows/container-tests.yml

Lines changed: 24 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -41,45 +41,38 @@ jobs:
4141
compose="Fedora-latest"
4242
context="Fedora"
4343
tmt_plan="/fedora"
44+
elif [ "${{ matrix.os }}" == "c9s" ]; then
45+
compose="CentOS-Stream-9"
46+
context="CentOS Stream 9"
47+
tmt_plan="/c9s"
48+
elif [ "${{ matrix.os }}" == "c10s" ]; then
49+
compose="CentOS-Stream-10"
50+
context="CentOS Stream 10"
51+
tmt_plan="/c10s"
4452
else
45-
if [ "${{ matrix.os }}" == "c9s" ]; then
46-
compose="CentOS-Stream-9"
47-
context="CentOS Stream 9"
48-
tmt_plan="/c9s"
49-
else
50-
if [ "${{ matrix.os }}" == "c10s" ]; then
51-
compose="CentOS-Stream-10"
52-
context="CentOS Stream 10"
53-
tmt_plan="/c10s"
54-
else
55-
# TODO - update compose and context for c11s when it will be available in Testing Farm
56-
compose="CentOS-Stream-10"
57-
context="CentOS Stream 11"
58-
tmt_plan="/c11s"
59-
fi
60-
fi
53+
# TODO - update compose and context for c11s when it will be available in Testing Farm
54+
compose="CentOS-Stream-10"
55+
context="CentOS Stream 11"
56+
tmt_plan="/c11s"
6157
fi
6258
else
6359
if [ "${{ matrix.os }}" == "rhel8" ]; then
6460
compose="RHEL-8.10.0-Nightly"
6561
context="RHEL8"
6662
tmt_plan="/rhel8-docker$"
63+
elif [ "${{ matrix.os }}" == "rhel9" ]; then
64+
compose="RHEL-9.6.0-Nightly"
65+
context="RHEL9"
66+
tmt_plan="/rhel9-docker$"
67+
elif [ "${{ matrix.os }}" == "rhel10" ]; then
68+
compose="RHEL-10-Nightly"
69+
context="RHEL10"
70+
tmt_plan="/rhel10-docker$"
6771
else
68-
if [ "${{ matrix.os }}" == "rhel9" ]; then
69-
compose="RHEL-9.6.0-Nightly"
70-
context="RHEL9"
71-
tmt_plan="/rhel9-docker$"
72-
else
73-
if [ "${{ matrix.os }}" == "rhel10" ]; then
74-
compose="RHEL-10-Nightly"
75-
context="RHEL10"
76-
tmt_plan="/rhel10-docker$"
77-
else
78-
# TODO - update compose and context for rhel11 when it will be available in Testing Farm
79-
compose="RHEL-10-Nightly"
80-
context="RHEL11"
81-
tmt_plan="/rhel11-docker$"
82-
fi
72+
# TODO - update compose and context for rhel11 when it will be available in Testing Farm
73+
compose="RHEL-10-Nightly"
74+
context="RHEL11"
75+
tmt_plan="/rhel11-docker$"
8376
fi
8477
fi
8578
echo "api_key=$api_key" >> "$GITHUB_OUTPUT"

0 commit comments

Comments
 (0)