Skip to content

Commit cbaf56f

Browse files
authored
Use slightly different cmd to get node IP in kind script (#47)
* Use slightly different cmd to get node IP in kind script Signed-off-by: Jakub Stejskal <xstejs24@gmail.com> * Change command also inside action Signed-off-by: Jakub Stejskal <xstejs24@gmail.com> --------- Signed-off-by: Jakub Stejskal <xstejs24@gmail.com>
1 parent 7a27ed0 commit cbaf56f

2 files changed

Lines changed: 9 additions & 3 deletions

File tree

.github/actions/dependencies/setup-kind/action.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,16 @@ runs:
8484
- name: Set DOCKER_REGISTRY
8585
shell: bash
8686
run: |
87-
echo "DOCKER_REGISTRY=$(hostname --ip-address | grep -oE '\b([0-9]{1,3}\.){3}[0-9]{1,3}\b' | awk '$1 != "127.0.0.1" { print $1 }' | head -1):5001" >> $GITHUB_ENV
87+
echo "DOCKER_REGISTRY=$(hostname --all-ip-addresses | awk '{ print $1 }'):5001" >> $GITHUB_ENV
8888
8989
# This is used for building connect image used withing STs for runs where already existing images are used (releases)
9090
- name: Set CONNECT_BUILD_REGISTRY
9191
shell: bash
9292
run: |
93-
echo "CONNECT_BUILD_REGISTRY=$(hostname --ip-address | grep -oE '\b([0-9]{1,3}\.){3}[0-9]{1,3}\b' | awk '$1 != "127.0.0.1" { print $1 }' | head -1):5001" >> $GITHUB_ENV
93+
echo "CONNECT_BUILD_REGISTRY=$(hostname --all-ip-addresses | awk '{ print $1 }'):5001" >> $GITHUB_ENV
94+
95+
- name: Print registry values
96+
shell: bash
97+
run: |
98+
echo "DOCKER_REGISTRY=${DOCKER_REGISTRY}"
99+
echo "CONNECT_BUILD_REGISTRY=${CONNECT_BUILD_REGISTRY}"

.github/actions/dependencies/setup-kind/setup-kind.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ network_name="kind"
376376
configure_network "${network_name}"
377377

378378
if [[ "$IP_FAMILY" = "ipv4" || "$IP_FAMILY" = "dual" ]]; then
379-
hostname=$(hostname --ip-address | grep -oE '\b([0-9]{1,3}\.){3}[0-9]{1,3}\b' | awk '$1 != "127.0.0.1" { print $1 }' | head -1)
379+
hostname=$(hostname --all-ip-addresses | awk '{ print $1 }')
380380

381381
# update insecure registries
382382
updateContainerRuntimeConfiguration "${hostname}:${reg_port}"

0 commit comments

Comments
 (0)