From 43996de28e163daf1c26909bea705671a5357875 Mon Sep 17 00:00:00 2001 From: "radoslaw.lisowski@schibsted.pl" Date: Tue, 9 Apr 2024 11:34:18 +0200 Subject: [PATCH 1/4] chore: fixed missing --wait parameter --- entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/entrypoint.sh b/entrypoint.sh index 994a818..5070bf3 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -49,4 +49,4 @@ fi # shellcheck disable=SC2086 # BUILDARGS_COMMAND/CACHED_COMMAND/MANIFEST_COMMAND are intentionally unquoted (word-split, may be empty) -convox deploy --app "$INPUT_APP" --description "$INPUT_DESCRIPTION" $BUILDARGS_COMMAND $CACHED_COMMAND $MANIFEST_COMMAND +convox deploy --app "$INPUT_APP" --description "$INPUT_DESCRIPTION" $BUILDARGS_COMMAND $CACHED_COMMAND $MANIFEST_COMMAND --wait From 2fb3d062f2e6416850d91fc42a2a5c8602534e68 Mon Sep 17 00:00:00 2001 From: "radoslaw.lisowski@schibsted.pl" Date: Tue, 21 Jul 2026 09:41:57 +0200 Subject: [PATCH 2/4] fix: added force parameter to convox deploy, true by default to mitigate CICD regression after convox/convox#1059 --- action.yml | 4 ++++ entrypoint.sh | 37 +++++++++++++------------------------ 2 files changed, 17 insertions(+), 24 deletions(-) diff --git a/action.yml b/action.yml index 2196d55..4854129 100644 --- a/action.yml +++ b/action.yml @@ -31,6 +31,10 @@ inputs: buildargs: description: Custom build arguments for the Docker build required: false + force: + description: Whether to force the deployment + required: false + default: 'true' runs: using: docker image: Dockerfile diff --git a/entrypoint.sh b/entrypoint.sh index 5070bf3..79b7479 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -11,42 +11,31 @@ if [ -z "${INPUT_APP:-}" ]; then fi echo "Deploying" -if [ -n "$INPUT_PASSWORD" ] -then - export CONVOX_PASSWORD="$INPUT_PASSWORD" -fi -if [ -n "$INPUT_HOST" ] -then - export CONVOX_HOST="$INPUT_HOST" -fi -export CONVOX_RACK="$INPUT_RACK" - -# Initialize variables for the command options -CACHED_COMMAND="" -MANIFEST_COMMAND="" -if [ "$INPUT_CACHED" = "false" ]; then - CACHED_COMMAND="--no-cache" -fi +# Export Convox environment variables +[ -n "$INPUT_PASSWORD" ] && export CONVOX_PASSWORD="$INPUT_PASSWORD" +[ -n "$INPUT_HOST" ] && export CONVOX_HOST="$INPUT_HOST" +export CONVOX_RACK="$INPUT_RACK" -if [ "$INPUT_MANIFEST" != "" ]; then - MANIFEST_COMMAND="-m $INPUT_MANIFEST" -fi +# Build optional flags +ARGS="" +[ "$INPUT_CACHED" = "false" ] && ARGS="$ARGS --no-cache" +[ -n "$INPUT_MANIFEST" ] && ARGS="$ARGS -m $INPUT_MANIFEST" +[ "$INPUT_FORCE" = "true" ] && ARGS="$ARGS --force" # Split the INPUT_BUILDARGS by newline into an array if [ "$INPUT_BUILDARGS" != "" ]; then - IFS=$'\n' read -d '' -r -a ADDR <<< "$INPUT_BUILDARGS" # Split build arguments by newline + IFS=$'\n' read -d '' -r -a ADDR <<< "$INPUT_BUILDARGS" for ARG in "${ADDR[@]}"; do - # Extract key and value (handle empty lines or invalid format) KEY=${ARG%%=*} VALUE=${ARG#*=} if [[ -n "$KEY" && -n "$VALUE" ]]; then - BUILDARGS_COMMAND="$BUILDARGS_COMMAND --build-args $KEY=$VALUE" + ARGS="$ARGS --build-args $KEY=$VALUE" fi done fi # shellcheck disable=SC2086 -# BUILDARGS_COMMAND/CACHED_COMMAND/MANIFEST_COMMAND are intentionally unquoted (word-split, may be empty) -convox deploy --app "$INPUT_APP" --description "$INPUT_DESCRIPTION" $BUILDARGS_COMMAND $CACHED_COMMAND $MANIFEST_COMMAND --wait +# ARGS is intentionally unquoted (word-split, may be empty) +convox deploy --app "$INPUT_APP" --description "$INPUT_DESCRIPTION" $ARGS --wait From f9a2a8e386961fb55c69c7ca5729f5ac83b01d26 Mon Sep 17 00:00:00 2001 From: "radoslaw.lisowski@schibsted.pl" Date: Tue, 21 Jul 2026 09:51:08 +0200 Subject: [PATCH 3/4] chore: normalize quote style in action.yml --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 4854129..8d527de 100644 --- a/action.yml +++ b/action.yml @@ -34,7 +34,7 @@ inputs: force: description: Whether to force the deployment required: false - default: 'true' + default: "true" runs: using: docker image: Dockerfile From b103f34ca728d3c66543f908ad520c3cddd7172b Mon Sep 17 00:00:00 2001 From: "radoslaw.lisowski@schibsted.pl" Date: Tue, 21 Jul 2026 17:37:16 +0200 Subject: [PATCH 4/4] chore: removed the force flag as it is going away --- action.yml | 4 ---- entrypoint.sh | 1 - 2 files changed, 5 deletions(-) diff --git a/action.yml b/action.yml index 8d527de..2196d55 100644 --- a/action.yml +++ b/action.yml @@ -31,10 +31,6 @@ inputs: buildargs: description: Custom build arguments for the Docker build required: false - force: - description: Whether to force the deployment - required: false - default: "true" runs: using: docker image: Dockerfile diff --git a/entrypoint.sh b/entrypoint.sh index 79b7479..2ffe74a 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -21,7 +21,6 @@ export CONVOX_RACK="$INPUT_RACK" ARGS="" [ "$INPUT_CACHED" = "false" ] && ARGS="$ARGS --no-cache" [ -n "$INPUT_MANIFEST" ] && ARGS="$ARGS -m $INPUT_MANIFEST" -[ "$INPUT_FORCE" = "true" ] && ARGS="$ARGS --force" # Split the INPUT_BUILDARGS by newline into an array if [ "$INPUT_BUILDARGS" != "" ]; then