-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (43 loc) · 1.22 KB
/
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
36
37
38
39
40
41
42
43
44
45
46
47
---
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: 'Flux Diff'
on:
pull_request:
branches: ['main']
paths: ['cluster/kubernetes/**']
concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
cancel-in-progress: true
permissions:
pull-requests: write
jobs:
flux-diff:
name: Flux Diff
runs-on: ubuntu-24.04
strategy:
matrix:
resource:
- helmrelease
- kustomization
steps:
- name: Setup Flux CLI
uses: fluxcd/flux2/[email protected]
- name: Run diff
uses: allenporter/flux-local/action/[email protected]
id: diff
with:
live-branch: main
path: cluster/kubernetes/flux/main
resource: ${{ matrix.resource }}
debug: true
- 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 }}
```