diff --git a/.github/workflows/flux-diff.yaml b/.github/workflows/flux-diff.yaml index 360207161e03d..3fbff332619fa 100644 --- a/.github/workflows/flux-diff.yaml +++ b/.github/workflows/flux-diff.yaml @@ -86,18 +86,16 @@ jobs: # path: "${{ matrix.paths }}" # resource: "${{ matrix.resources }}" - - name: Checkout PR branch + - name: Checkout Live Branch uses: actions/checkout@v4 with: token: "${{ steps.app-token.outputs.token }}" - path: pr - - name: Checkout Live Branch + - name: Checkout PR branch uses: actions/checkout@v4 with: token: "${{ steps.app-token.outputs.token }}" - ref: main - path: live + path: pr - name: Diff Resources uses: docker://ghcr.io/allenporter/flux-local:main @@ -105,20 +103,20 @@ jobs: args: >- diff ${{ matrix.resources }} --unified 6 + --path-orig ${{ matrix.paths }} --path pr/${{ matrix.paths }} - --path-orig live/${{ matrix.paths }} --strip-attrs "helm.sh/chart,checksum/config,app.kubernetes.io/version,chart" --limit-bytes 10000 --all-namespaces --sources "home-kubernetes" - --output-file diff.txt + --output-file diff.patch - name: Generate Diff id: diff run: | - cat diff.txt + cat diff.patch echo "diff<> $GITHUB_OUTPUT - cat diff.txt >> $GITHUB_OUTPUT + cat diff.patch >> $GITHUB_OUTPUT echo "EOF" >> $GITHUB_OUTPUT - if: ${{ steps.diff.outputs.diff != '' }}