-
Notifications
You must be signed in to change notification settings - Fork 1
146 lines (129 loc) · 4.82 KB
/
update-dependencies.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
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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
# This workflow proposes updates to the dependencies that dependabot cannot
name: Update dependencies
on:
# Allow manual executions
workflow_dispatch:
# Run nightly
schedule:
- cron: '0 0 * * *'
jobs:
propose_github_release_updates:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- key: helm
path: ./.github/workflows/build-push-artifacts.yaml
repository: helm/helm
version_jsonpath: env.HELM_VERSION
- key: openstack-cluster
path: ./.github/workflows/build-push-artifacts.yaml
repository: stackhpc/capi-helm-charts
prereleases: "yes"
version_jsonpath: env.OPENSTACK_CLUSTER_CHART_VERSION
- key: zenith
path: ./.github/workflows/build-push-artifacts.yaml
repository: stackhpc/zenith
prereleases: "yes"
version_jsonpath: env.ZENITH_CHART_VERSION
name: ${{ matrix.key }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Check for most recent GitHub release
id: next
uses: stackhpc/github-actions/github-latest-release@master
with:
repository: ${{ matrix.repository }}
prereleases: ${{ matrix.prereleases || 'no' }}
- name: Update dependency key
uses: stackhpc/github-actions/config-update@master
with:
path: ${{ matrix.path }}
updates: |
${{ matrix.version_jsonpath }}=${{ steps.next.outputs.version }}
- name: Generate app token for PR
uses: stackhpc/github-actions/generate-app-token@master
id: generate-app-token
with:
repository: ${{ github.repository }}
app-id: ${{ secrets.APP_ID }}
app-private-key: ${{ secrets.APP_PRIVATE_KEY }}
- name: Propose changes via PR if required
uses: peter-evans/create-pull-request@v5
with:
token: ${{ steps.generate-app-token.outputs.token }}
commit-message: >-
Bump ${{ matrix.key }} to ${{ steps.next.outputs.version }}
branch: update-dependency/${{ matrix.key }}
delete-branch: true
title: >-
Bump ${{ matrix.key }} to ${{ steps.next.outputs.version }}
body: >
This PR was created automatically to update
${{ matrix.key }} to ${{ steps.next.outputs.version }}.
labels: |
automation
dependency-update
propose_helm_chart_updates:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- key: reloader
path: ./chart/Chart.yaml
chart_name_jsonpath: dependencies[0].name
chart_repo_jsonpath: dependencies[0].repository
chart_version_jsonpath: dependencies[0].version
- key: kube-state-metrics
path: ./chart/Chart.yaml
chart_name_jsonpath: dependencies[1].name
chart_repo_jsonpath: dependencies[1].repository
chart_version_jsonpath: dependencies[1].version
name: ${{ matrix.key }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Extract repo and chart
id: chart-info
uses: stackhpc/github-actions/config-extract@master
with:
path: ${{ matrix.path }}
outputs: |
repo=${{ matrix.chart_repo_jsonpath }}
name=${{ matrix.chart_name_jsonpath }}
- name: Check for updates
id: next
uses: stackhpc/github-actions/helm-latest-version@master
with:
repository: ${{ steps.chart-info.outputs.repo }}
chart: ${{ steps.chart-info.outputs.name }}
- name: Update chart version
uses: stackhpc/github-actions/config-update@master
with:
path: ${{ matrix.path }}
updates: |
${{ matrix.chart_version_jsonpath }}=${{ steps.next.outputs.version }}
- name: Generate app token for PR
uses: stackhpc/github-actions/generate-app-token@master
id: generate-app-token
with:
repository: ${{ github.repository }}
app-id: ${{ secrets.APP_ID }}
app-private-key: ${{ secrets.APP_PRIVATE_KEY }}
- name: Propose changes via PR if required
uses: peter-evans/create-pull-request@v5
with:
token: ${{ steps.generate-app-token.outputs.token }}
commit-message: >-
Bump ${{ matrix.key }} to ${{ steps.next.outputs.version }}
branch: update-dependency/${{ matrix.key }}
delete-branch: true
title: >-
Bump ${{ matrix.key }} to ${{ steps.next.outputs.version }}
body: >
This PR was created automatically to update
${{ matrix.key }} to ${{ steps.next.outputs.version }}.
labels: |
automation
dependency-update