-
Notifications
You must be signed in to change notification settings - Fork 22
49 lines (47 loc) · 1.2 KB
/
flux-local-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
48
49
---
name: flux-local diff
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
diffs:
name: Compute diffs
runs-on: ubuntu-latest
strategy:
matrix:
cluster_path:
- tests/testdata/cluster
- tests/testdata/cluster2
- tests/testdata/cluster3
- tests/testdata/cluster4
- tests/testdata/cluster5
- tests/testdata/cluster6
resource:
- helmrelease
- kustomization
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: ./action/diff
id: diff
with:
path: ${{ matrix.cluster_path }}
resource: ${{ matrix.resource }}
debug: true
sources: cluster=tests/testdata/cluster3
api-versions: batch/v1/CronJob
- 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.cluster_path }}/${{ matrix.resource }}
message-failure: Unable to post kustomization diff
message: |
`````diff
${{ steps.diff.outputs.diff }}
`````