Skip to content

Commit b28228b

Browse files
committed
Attempt to use booleans for input again
1 parent 241fbe6 commit b28228b

File tree

2 files changed

+26
-28
lines changed

2 files changed

+26
-28
lines changed

.github/workflows/build_test_push.yaml

+22-24
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@ name: Build, test & push executor
22

33
on:
44
workflow_call:
5-
# WARNING:
6-
# 1. Duplicate everything here into workflow_dispatch
7-
# 2. Type "boolean" is not supported
5+
# WARNING: Duplicate everything here into workflow_dispatch
86
inputs:
97
rondb_version:
108
required: true
@@ -18,12 +16,12 @@ on:
1816
is_latest_rondb_release:
1917
required: true
2018
description: "Used to decide whether the Docker image will be using the 'latest' tag without a version number"
21-
type: string
22-
default: 'false'
19+
type: boolean
20+
default: false
2321
skip_test:
2422
required: true
25-
type: string
26-
default: 'false'
23+
type: boolean
24+
default: false
2725
# Inputs here have to be duplicated from workflow_call...
2826
# https://github.com/orgs/community/discussions/39357
2927
workflow_dispatch:
@@ -40,12 +38,12 @@ on:
4038
is_latest_rondb_release:
4139
required: true
4240
description: "Used to decide whether the Docker image will be using the 'latest' tag without a version number"
43-
type: string
44-
default: 'false'
41+
type: boolean
42+
default: false
4543
skip_test:
4644
required: true
47-
type: string
48-
default: 'false'
45+
type: boolean
46+
default: false
4947

5048
env:
5149
BASE_DOWNLOAD_URL: https://repo.hops.works/master
@@ -57,7 +55,7 @@ jobs:
5755
runs-on: ubuntu-latest
5856
# This will block all other jobs from running due to "needs"
5957
if: |
60-
${{ inputs.skip_test == 'false' || (
58+
${{ !inputs.skip_test || (
6159
github.repository == 'logicalclocks/rondb-docker' &&
6260
(startsWith(github.ref_name, 'release-') || github.ref_name == 'main')
6361
)}}
@@ -96,7 +94,7 @@ jobs:
9694
password: ${{ secrets.DOCKERHUB_TOKEN }}
9795

9896
- name: Build and run Docker Compose cluster with benchmarking
99-
if: ${{ inputs.skip_test == 'false' }}
97+
if: ${{ !inputs.skip_test }}
10098
run: |
10199
./run.sh -lv \
102100
--rondb-tarball-url $BASE_DOWNLOAD_URL/${{ inputs.rondb_x86_tarball_name }} \
@@ -106,7 +104,7 @@ jobs:
106104
--detached
107105
108106
- name: Wait for one container exit or timeout
109-
if: ${{ inputs.skip_test == 'false' }}
107+
if: ${{ !inputs.skip_test }}
110108
run: |
111109
start=`date +%s`
112110
while true; do
@@ -125,24 +123,24 @@ jobs:
125123
done
126124
127125
- run: docker container ls
128-
if: ${{ inputs.skip_test == 'false' }}
126+
if: ${{ !inputs.skip_test }}
129127
- run: docker logs mgmd_1
130-
if: ${{ inputs.skip_test == 'false' }}
128+
if: ${{ !inputs.skip_test }}
131129
- run: docker logs ndbd_1
132-
if: ${{ inputs.skip_test == 'false' }}
130+
if: ${{ !inputs.skip_test }}
133131
- run: docker logs mysqld_1
134-
if: ${{ inputs.skip_test == 'false' }}
132+
if: ${{ !inputs.skip_test }}
135133
- run: docker logs rest_1
136-
if: ${{ inputs.skip_test == 'false' }}
134+
if: ${{ !inputs.skip_test }}
137135
- run: docker logs bench_1
138-
if: ${{ inputs.skip_test == 'false' }}
136+
if: ${{ !inputs.skip_test }}
139137

140138
# At this point we only know that one container has exited. We want to
141139
# check whether the bench container has exited with exit code 0. We need
142140
# both status and exit code to do so, since Docker reports exit code 0
143141
# for running containers.
144142
- name: Check Benchmarking Exit Code
145-
if: ${{ inputs.skip_test == 'false' }}
143+
if: ${{ !inputs.skip_test }}
146144
run: |
147145
if [ "$(docker inspect bench_1 --format='{{.State.Status}}')" != "exited" ]
148146
then
@@ -157,11 +155,11 @@ jobs:
157155
fi
158156
159157
- name: Printing Sysbench results
160-
if: ${{ inputs.skip_test == 'false' }}
158+
if: ${{ !inputs.skip_test }}
161159
run: cat autogenerated_files/*/volumes/sysbench_single/final_result.txt
162160

163161
- name: Build X86 image
164-
if: ${{ inputs.skip_test == 'true' && github.repository == 'logicalclocks/rondb-docker' && (startsWith(github.ref_name, 'release-') || github.ref_name == 'main')}}
162+
if: ${{ inputs.skip_test && github.repository == 'logicalclocks/rondb-docker' && (startsWith(github.ref_name, 'release-') || github.ref_name == 'main')}}
165163
run: |
166164
VERSION="$(sed -e 's/^[[:space:]]*//' -e '/-SNAPSHOT$/s/.*/dev/' ./VERSION)"
167165
docker buildx build . \
@@ -190,7 +188,7 @@ jobs:
190188
docker push $IMAGE_NAME
191189
192190
- name: Push with tag `latest`
193-
if: ${{ needs.check-git.outputs.is_highest_release == 'true' && inputs.is_latest_rondb_release == 'true' }}
191+
if: ${{ needs.check-git.outputs.is_highest_release && inputs.is_latest_rondb_release }}
194192
run: |
195193
VERSION="$(sed -e 's/^[[:space:]]*//' -e '/-SNAPSHOT$/s/.*/dev/' ./VERSION)"
196194
IMAGE_NAME=hopsworks/$X86_IMAGE_NAME:latest

.github/workflows/main.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@ jobs:
2020
matrix:
2121
info:
2222
- rondb_version: 21.04.16
23-
is_latest_rondb_release: 'false'
23+
is_latest_rondb_release: false
2424
glibc_version_x86: 2.17
2525
glibc_version_arm64: 2.35
26-
skip_test: 'true'
26+
skip_test: true
2727
- rondb_version: 22.10.3
28-
is_latest_rondb_release: 'true'
28+
is_latest_rondb_release: true
2929
glibc_version_x86: 2.28
3030
glibc_version_arm64: 2.28
31-
skip_test: 'false'
31+
skip_test: false
3232
with:
3333
rondb_version: ${{ matrix.info.rondb_version }}
3434
is_latest_rondb_release: ${{ matrix.info.is_latest_rondb_release }}

0 commit comments

Comments
 (0)