-
-
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@19bfc6920e8964a479363bc230e6c329120ead02 # 3.2.0
id: diff
with:
path: "./"
resource: "${{ matrix.resource }}"
- if: ${{ steps.diff.outputs.diff != '' }}
name: Add comment
uses: mshick/add-pr-comment@b8f338c590a895d50bcbfa6c5859251edc8952fc # v2.8.2
with:
message-id: "${{ github.event.pull_request.number }}/${{ matrix.path }}/${{ matrix.resource }}"
message-failure: Diff was not successful
message: |
```diff
${{ steps.diff.outputs.diff }}
```