-
Notifications
You must be signed in to change notification settings - Fork 4
74 lines (62 loc) · 1.76 KB
/
gitops-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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
on:
pull_request:
types: [opened, synchronize]
permissions:
contents: read
pull-requests: write
name: Diff GitOps
jobs:
diff:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.diffStep.outputs.matrix }}
steps:
- name: Checkout PR
uses: actions/checkout@v4
with:
path: pr
- name: Checkout Target of PR
uses: actions/checkout@v4
with:
path: target
ref: ${{ github.event.pull_request.base.ref }}
- name: diff charts
id: diffStep
shell: bash
run: |
bash pr/.github/create-pr-comment-file.sh
- uses: actions/upload-artifact@v4
with:
name: comment-files-artifact
path: comment-files/
create-template-render-diff-comment:
needs: diff
runs-on: ubuntu-latest
if: ${{ fromJSON(needs.diff.outputs.matrix).comment-files[0] }}
strategy:
matrix: ${{fromJSON(needs.diff.outputs.matrix)}}
max-parallel: 1
steps:
- uses: actions/download-artifact@v4
with:
name: comment-files-artifact
path: comment-files/
- uses: thollander/actions-comment-pull-request@v3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
file-path: ${{matrix.comment-files}}
create-default-value-diff-comment:
needs: diff
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
name: comment-files-artifact
path: comment-files/
- name: PR comment default values with file
uses: thollander/actions-comment-pull-request@v3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
file-path: comment-files/comment-default-values-result.txt