-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (34 loc) · 928 Bytes
/
pr-checks.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
name: PR Diffs
on:
workflow_dispatch:
pull_request:
types: [edited]
jobs:
diffs:
name: Compute diffs
runs-on: ubuntu-latest
strategy:
matrix:
resource:
- helmrelease
- kustomization
steps:
- name: Setup Flux CLI
uses: fluxcd/flux2/action@v2.4.0
- uses: allenporter/flux-local/action/diff@6.0.2
id: diff
with:
live-branch: main
path: cluster
resource: ${{ matrix.resource }}
- name: PR Comments
uses: mshick/add-pr-comment@v2
if: ${{ steps.diff.outputs.diff != '' }}
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
message-id: ${{ github.event.pull_request.number }}/${{ matrix.resource }}
message-failure: Unable to post kustomization diff
message: |
`````diff
${{ steps.diff.outputs.diff }}
`````