diff --git a/.github/workflows/docker_build_upgrade_k8s.yml b/.github/workflows/docker_build_upgrade_k8s.yml index 65f7a16..8ca120a 100644 --- a/.github/workflows/docker_build_upgrade_k8s.yml +++ b/.github/workflows/docker_build_upgrade_k8s.yml @@ -5,12 +5,12 @@ on: branches: - main paths: - - 'upgrade_edge/Dockerfile' + - 'upgrade_edge/**' pull_request: branches: - main paths: - - 'upgrade_edge/Dockerfile' + - 'upgrade_edge/**' workflow_dispatch: jobs: diff --git a/upgrade_edge/Dockerfile b/upgrade_edge/Dockerfile index 71c09de..3df3cbe 100644 --- a/upgrade_edge/Dockerfile +++ b/upgrade_edge/Dockerfile @@ -4,4 +4,4 @@ COPY upgrade_edge/upgrade_edge.sh /opt/upgrade_edge.sh RUN chmod +x /opt/upgrade_edge.sh -CMD ["/opt/upgrade_edge.sh"] \ No newline at end of file +CMD ["/bin/sh", "/opt/upgrade_edge.sh"] diff --git a/upgrade_edge/upgrade_edge.sh b/upgrade_edge/upgrade_edge.sh index edd0d0f..a4c13e0 100644 --- a/upgrade_edge/upgrade_edge.sh +++ b/upgrade_edge/upgrade_edge.sh @@ -7,7 +7,7 @@ #TALOS_VERSION="v1.5.5" #UPGRADE_KUBERENTES="true" -if [[ "$UPGRADE_KUBERNETES" == "true" ]] || [[ "$UPGRADE_TALOS" == "true" && -n $TALOS_VERSION ]]; then +if [[ "$UPGRADE_KUBERNETES" != "true" ]] || { [[ "$UPGRADE_TALOS" != "true" ]] && [[ -z "$TALOS_VERSION" ]]; }; then echo "None of the variables UPGRADE_KUBERNETES or UPGRADE_TALOS has been set to true (true as a string, not a boolean), exiting without any upgrading" echo $UPGRADE_KUBERENTES echo $UPGRADE_TALOS @@ -87,4 +87,4 @@ elif [ "$UPGRADE_KUBERENTES" = "true" ]; then check_talosctl_version get_current_k8s_version upgrade_kubernetes -fi \ No newline at end of file +fi