Skip to content

Commit

Permalink
Use --output-file in diff action
Browse files Browse the repository at this point in the history
  • Loading branch information
allenporter committed Dec 22, 2023
1 parent ca7728b commit 39df80c
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions action/diff/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,9 @@ runs:
with:
ref: ${{ inputs.live-branch }}
path: live
- name: flux-local diff
- name: Diff Resources
id: flux_diff
run: |
delimiter="$(openssl rand -hex 8)"
echo "diff<<${delimiter}" >> $GITHUB_OUTPUT
if [[ "${{ inputs.resource }}" == "helmrelease" ]]; then
extra_flags="--api-versions=${{ inputs.api-versions}}"
else
Expand All @@ -106,7 +104,13 @@ runs:
--all-namespaces \
--kustomize-build-flags="${{ inputs.kustomize-build-flags }}" \
--sources "${{ inputs.sources }}" \
${extra_flags} \
>> $GITHUB_OUTPUT
--output-file diff.patch \
${extra_flags}
- name: Generate Diff output
id: flux_diff_output
run: |
delimiter="$(openssl rand -hex 8)"
echo "diff<<${delimiter}" >> $GITHUB_OUTPUT
cat diff.patch >> $GITHUB_OUTPUT
echo "${delimiter}" >> $GITHUB_OUTPUT
shell: bash

0 comments on commit 39df80c

Please sign in to comment.