From 39df80c1a971d41040807b9a0db749821d5ef0c8 Mon Sep 17 00:00:00 2001 From: Allen Porter Date: Fri, 22 Dec 2023 19:09:30 +0000 Subject: [PATCH] Use --output-file in diff action --- action/diff/action.yml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/action/diff/action.yml b/action/diff/action.yml index bbacac39..85bf7ec8 100644 --- a/action/diff/action.yml +++ b/action/diff/action.yml @@ -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 @@ -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