File tree Expand file tree Collapse file tree
charts/generic-govuk-app/templates Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4545 permissions :
4646 pull-requests : write
4747 steps :
48+ - uses : actions/checkout@v4
49+ with :
50+ fetch-depth : 0
51+ ref : ${{ github.event.pull_request.head.ref }}
52+ show-progress : false
4853 - uses : actions/download-artifact@v4
4954 with :
5055 name : rendered-charts-base
5661 - name : Diff charts and comment on PR
5762 env :
5863 GH_TOKEN : ${{ github.token }}
59- run : |
60- mkdir base head
61-
62- mv base-r/rendered-charts/* base/
63- mv head-r/rendered-charts/* head/
64-
65- DIFF=$(diff -r base/ head/)
66-
67- if [ -z "$DIFF" ]; then
68- cat <<EOF > pr.md
69- No changes detected in rendered charts.
70- EOF
71- else
72- cat <<EOF > pr.md
73- <details>
74- <summary>Rendered charts diff</summary>
75- This PR results in the following changes to rendered charts:
76-
77- ```diff
78- ${DIFF}
79- ```
80- </details>
81- EOF
82- fi
83-
84- gh pr comment "${{github.event.pull_request.html_url}}" --create-if-none --edit-last --body-file pr.md
64+ PR_URL : ${{ github.event.pull_request.html_url }}
65+ run : ./create-diff-pr.sh
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ metadata:
1010 app : {{ $fullName }}
1111 app.kubernetes.io/name : {{ $fullName }}
1212 app.kubernetes.io/component : app
13+ some-other-label : something
1314 annotations :
1415 {{- (tpl (toYaml .Values.ingress.annotations) .) | trim | nindent 4 }}
1516spec :
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ set -euo pipefail
3+
4+ echo " directories"
5+
6+ mkdir base head
7+
8+ mv base-r/rendered-charts/* base/
9+ mv head-r/rendered-charts/* head/
10+
11+ echo " diff"
12+
13+ diff -r base/ head/
14+
15+ DIFF=$( diff -r base/ head/)
16+
17+ echo " before if"
18+
19+ if [ -z " $DIFF " ]; then
20+ cat << 'EOF ' > pr.md
21+ No changes detected in rendered charts.
22+ EOF
23+ else
24+ echo " there are changes"
25+ echo " ${DIFF} "
26+ cat << 'EOF ' > pr.md
27+ <details>
28+ <summary>Rendered charts diff</summary>
29+ This PR results in the following changes to rendered charts:
30+
31+ ```diff
32+ EOF
33+ {
34+ echo " $DIFF "
35+ echo ' ```'
36+ echo ' </details>'
37+ } >> pr.md
38+ fi
39+
40+ gh pr comment " ${PR_URL} " --create-if-none --edit-last --body-file pr.md
You can’t perform that action at this time.
0 commit comments