-
Notifications
You must be signed in to change notification settings - Fork 6
131 lines (117 loc) · 5.16 KB
/
updatecli.yml
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
---
name: "Check dependency(helm chart) updates"
on:
workflow_dispatch:
schedule:
# * is a special character in YAML so you have to quote this string
# Run once a day
- cron: '0 7 * * *'
env:
UPDATECLI_CONFIG_DIR: "${{ github.workspace }}/.github/updatecli.d"
jobs:
updateCommonCharts:
name: Bump common dependency Helm charts
runs-on: "ubuntu-latest"
steps:
-
name: Create Github App[bot] Token
uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ vars.APP_ID }}
private-key: ${{ secrets.PRIVATE_KEY }}
-
name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1
-
name: Setup updatecli
uses: updatecli/updatecli-action@v2
-
name: Run Updatecli
id: updatecli-apply
run: |
CHANGELOG=$(updatecli apply --config ${UPDATECLI_CONFIG_DIR}/common-charts.yaml 2>&1)
if ! git diff --exit-code > /dev/null; then
echo "changed=true" >> "${GITHUB_OUTPUT}"
echo "body<<EOF" >> ${GITHUB_OUTPUT}
# here we can place the command that will generate multi-line text
echo "${CHANGELOG}" | awk '/^TARGETS$/,0' >> "${GITHUB_OUTPUT}"
echo "EOF" >> ${GITHUB_OUTPUT}
fi
-
name: Create pull request
if: steps.updatecli-apply.outputs.changed == 'true'
uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f #v7.0.5
with:
token: ${{ steps.app-token.outputs.token }}
title: "[kubernetes] Update common dependency helm charts"
commit-message: Update common dependency helm charts
committer: 🤖QC Owl App[bot] <165384878+qc-owl-app[bot]@users.noreply.github.com>
signoff: true
body: |
🤖 Update common dependency helm charts
<details>
<summary> FULL TARGETS CHANGELOG </summary>
<blockquote>
${{ steps.updatecli-apply.outputs.body }}
</blockquote>
</details>
<br />
> Auto-generated by [.github/workflows/updatecli.yml][0]
[0]: https://github.com/qclaogui/codelab-monitoring/blob/main/.github/workflows/updatecli.yml
labels: dependencies
branch: update-common-helm-charts
delete-branch: true
updateLGTMPStackCharts:
name: Bump LGTMP stack dependency Helm charts
runs-on: "ubuntu-latest"
steps:
-
name: Create Github App[bot] Token
uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ vars.APP_ID }}
private-key: ${{ secrets.PRIVATE_KEY }}
-
name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1
-
name: Setup updatecli
uses: updatecli/updatecli-action@v2
-
name: Run Updatecli
id: updatecli-apply
run: |
CHANGELOG=$(updatecli apply --config ${UPDATECLI_CONFIG_DIR}/lgtmp-stack-charts.yaml 2>&1)
if ! git diff --exit-code > /dev/null; then
echo "changed=true" >> "${GITHUB_OUTPUT}"
echo "body<<EOF" >> ${GITHUB_OUTPUT}
# here we can place the command that will generate multi-line text
echo "${CHANGELOG}" | awk '/^TARGETS$/,0' >> "${GITHUB_OUTPUT}"
echo "EOF" >> ${GITHUB_OUTPUT}
fi
-
name: Create pull request
if: steps.updatecli-apply.outputs.changed == 'true'
uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f #v7.0.5
with:
token: ${{ steps.app-token.outputs.token }}
title: "[kubernetes] Update LGTMP stack dependency Helm charts"
commit-message: Update LGTMP stack dependency Helm charts
committer: 🤖QC Owl App[bot] <165384878+qc-owl-app[bot]@users.noreply.github.com>
signoff: true
body: |
🤖 Update LGTMP stack dependency Helm charts
<details>
<summary> FULL TARGETS CHANGELOG </summary>
<blockquote>
${{ steps.updatecli-apply.outputs.body }}
</blockquote>
</details>
<br />
> Auto-generated by [.github/workflows/updatecli.yml][0]
[0]: https://github.com/qclaogui/codelab-monitoring/blob/main/.github/workflows/updatecli.yml
labels: dependencies
branch: update-lgtmp-helm-charts
delete-branch: true