Skip to content

Commit

Permalink
Fix api versions conditional logic
Browse files Browse the repository at this point in the history
  • Loading branch information
allenporter committed Jul 1, 2023
1 parent f7559fd commit d133bc7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion action/diff/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -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

0 comments on commit d133bc7

Please sign in to comment.