-
-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (32 loc) · 980 Bytes
/
flux-diff.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
---
name: "Flux Diff"
on:
pull_request:
branches: ["main"]
jobs:
flux-diff:
name: Flux Diff
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
strategy:
matrix:
resource: ["helmrelease", "kustomization"]
steps:
- name: Diff Resources
uses: allenporter/flux-local/action/diff@efbe055c6dc2a63d1102db582632d2aa03696664 # 3.1.1
id: diff
with:
path: "./"
resource: "${{ matrix.resource }}"
- if: ${{ steps.diff.outputs.diff != '' }}
name: Add comment
uses: mshick/add-pr-comment@7c0890544fb33b0bdd2e59467fbacb62e028a096 # v2.8.1
with:
message-id: "${{ github.event.pull_request.number }}/${{ matrix.path }}/${{ matrix.resource }}"
message-failure: Diff was not successful
message: |
```diff
${{ steps.diff.outputs.diff }}
```