From 788d8f38fd3e059d55664a47ec95f063be286e4f Mon Sep 17 00:00:00 2001 From: Louis GERARD <186476141+lgerard-pass@users.noreply.github.com> Date: Thu, 2 Jan 2025 16:59:52 +0100 Subject: [PATCH] (PC-33758)(argocd): enable passing extra flags as input --- actions/argocd-sync/action.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/actions/argocd-sync/action.yml b/actions/argocd-sync/action.yml index c5f1f46..90be61a 100644 --- a/actions/argocd-sync/action.yml +++ b/actions/argocd-sync/action.yml @@ -29,6 +29,10 @@ inputs: description: Wether or not to use argocd prune option required: false default: false + extra_flags: + description: Additional flags that you want to pass to argocd sync + required: false + default: "" runs: using: 'composite' @@ -46,7 +50,7 @@ runs: shell: bash run: | kubectl config set-context --current --namespace=argocd - argocd_app_sync=(argocd app sync ${{ inputs.app_name }} --core --apply-out-of-sync-only --retry-backoff-duration ${{ inputs.retry_backoff_duration }} --retry-backoff-factor ${{ inputs.retry_backoff_factor }} --retry-backoff-max-duration ${{ inputs.retry_backoff_max_duration }} --timeout ${{ inputs.sync_timeout }}) + argocd_app_sync=(argocd app sync ${{ inputs.app_name }} --core --apply-out-of-sync-only --retry-backoff-duration ${{ inputs.retry_backoff_duration }} --retry-backoff-factor ${{ inputs.retry_backoff_factor }} --retry-backoff-max-duration ${{ inputs.retry_backoff_max_duration }} --timeout ${{ inputs.sync_timeout }} ${{ inputs.extra_flags }}) if [ ${{ inputs.prune }} == 'true' ]; then argocd_app_sync+=(--prune) fi