From 71cf145bf061fb832a4709b1d78212a486ecbf31 Mon Sep 17 00:00:00 2001 From: Rui Hu Date: Fri, 24 Oct 2025 16:47:27 +0800 Subject: [PATCH] fix: use default config if input config is empty --- action.yaml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/action.yaml b/action.yaml index d3a6aa3..bd2959f 100644 --- a/action.yaml +++ b/action.yaml @@ -4,7 +4,7 @@ description: Use Updatecli to update deployments for ArgoCD inputs: updatecli-config: description: Override default updatecli config - default: ${{ forge.action_path }}/updatecli.yaml + default: "" registry-url: description: Registry URL default: git.cleverthis.com @@ -59,6 +59,11 @@ runs: echo "Unknown target branch. We are not coming from main, master, nor develop branch." exit 1 fi + + configFilePath="${{ inputs.updatecli-config }}" + if [ -z "$configFilePath" ]; then + configFilePath="${{ forge.action_path }}/updatecli.yaml" + fi export TARGET_BRANCH - updatecli apply --config ${{ inputs.updatecli-config }} + updatecli apply --config "$configFilePath"