From d133bc71b0f75c5bb468321f32d15b801c130108 Mon Sep 17 00:00:00 2001 From: Allen Porter Date: Sat, 1 Jul 2023 15:17:05 -0700 Subject: [PATCH] Fix api versions conditional logic --- action/diff/action.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/action/diff/action.yml b/action/diff/action.yml index bf9364f3..61486b60 100644 --- a/action/diff/action.yml +++ b/action/diff/action.yml @@ -73,6 +73,11 @@ runs: run: | delimiter="$(openssl rand -hex 8)" echo "diff<<${delimiter}" >> $GITHUB_OUTPUT + if [[ "${{ inputs.resource }}" == "helmrelease" ]]; then + extra_flags="--api-versions=${{ inputs.api-versions}}" + else + extra_flags="" + fi flux-local \ --log-level ${{ inputs.debug != 'true' && 'INFO' || 'DEBUG' }} \ diff \ @@ -85,9 +90,9 @@ runs: --${{ inputs.skip-secrets != 'true' && 'no-' || '' }}skip-secrets \ --limit-bytes ${{ inputs.limit-bytes }} \ --all-namespaces \ - ${{ inputs.resource != 'helmrelease' && '' || join('--api-versions=', inputs.api-versions) }} \ --kustomize-build-flags="${{ inputs.kustomize-build-flags }}" \ --sources "${{ inputs.sources }}" \ + ${extra_flags} \ >> $GITHUB_OUTPUT echo "${delimiter}" >> $GITHUB_OUTPUT shell: bash