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=$( diff -r base/ head/)
14+
15+ echo " before if"
16+
17+ if [ -z " $DIFF " ]; then
18+ cat << 'EOF ' > pr.md
19+ No changes detected in rendered charts.
20+ EOF
21+ else
22+ echo " there are changes"
23+ echo " ${DIFF} "
24+ cat << 'EOF ' > pr.md
25+ <details>
26+ <summary>Rendered charts diff</summary>
27+ This PR results in the following changes to rendered charts:
28+
29+ ```diff
30+ EOF
31+ {
32+ echo " $DIFF "
33+ echo ' ```'
34+ echo ' </details>'
35+ } >> pr.md
36+ fi
37+
38+ 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