Skip to content

Commit 8fba36e

Browse files
committed
ci: add an action to update submodules
1 parent b383228 commit 8fba36e

File tree

2 files changed

+105
-0
lines changed

2 files changed

+105
-0
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Update submodules
2+
3+
on:
4+
schedule:
5+
- cron: '0 0 * * SUN' # Sunday midnight
6+
workflow_dispatch: # Or manually
7+
8+
permissions:
9+
contents: write
10+
pull-requests: write
11+
12+
jobs:
13+
update_submodules:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v3
17+
with:
18+
submodules: 'recursive'
19+
fetch-depth: 0
20+
- name: Update submodules
21+
uses: espressif/github-actions/update_submodule_versions@master
22+
with:
23+
repo-token: ${{ secrets.GITHUB_TOKEN }}
24+
git-author-name: ${{ secrets.SUBMODULE_UPDATE_AUTHOR_NAME }}
25+
git-author-email: ${{ secrets.SUBMODULE_UPDATE_AUTHOR_EMAIL }}

.gitmodules

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,36 @@
1818
# The submodule SHA recorded here has to match with SHA, which is presented in git-tree.
1919
# This is checked by CI. Also please don't forget to update the submodule version
2020
# if you are changing the sbom-hash. This is important for SBOM generation.
21+
#
22+
#
23+
# Submodules autoupdate
24+
# ---------------------
25+
# .github/workflows/update_submodules.yml workflow is used to make automatic pull
26+
# requests to update submodules. The workflow uses information from this file to
27+
# determine which submodules should be updated and how.
28+
# For each submodule, several "autoupdate-" entries can be specified, see:
29+
# https://github.com/espressif/github-actions/blob/master/update_submodule_versions/README.md
30+
#
2131

2232
[submodule "libsodium/libsodium"]
2333
path = libsodium/libsodium
2434
url = https://github.com/jedisct1/libsodium.git
35+
# libsodium doesn't tag new releases since 0.18.0, 'stable' branch is considered
36+
# to be the latest stable release. See:
37+
# https://github.com/jedisct1/libsodium/issues/1041#issuecomment-799812417
38+
# However since idf_component.yml had the version already set to 0.20.0,
39+
# we can't update the version automatically (it would be set it back to 0.18.0~n)
40+
# autoupdate = false
41+
2542
[submodule "cbor/tinycbor"]
2643
path = cbor/tinycbor
2744
url = https://github.com/intel/tinycbor.git
45+
autoupdate = true
46+
autoupdate-branch = main
47+
autoupdate-tag-glob = v[0-9]*.[0-9]*.[0-9]*
48+
autoupdate-manifest = cbor/idf_component.yml
49+
autoupdate-ver-regex = v([0-9]+).([0-9]+).([0-9]+)
50+
2851
[submodule "nghttp/nghttp2"]
2952
path = nghttp/nghttp2
3053
url = https://github.com/nghttp2/nghttp2.git
@@ -34,6 +57,11 @@
3457
sbom-url = https://github.com/nghttp2/nghttp2
3558
sbom-description = nghttp2 - HTTP/2 C Library and tools
3659
sbom-hash = be0491294a63d891bd12b6b1b7e372a45a5d0ffe
60+
autoupdate = true
61+
autoupdate-branch = master
62+
autoupdate-tag-glob = v[0-9]*.[0-9]*.[0-9]*
63+
autoupdate-manifest = nghttp/idf_component.yml
64+
autoupdate-ver-regex = v([0-9]+).([0-9]+).([0-9]+)
3765

3866
[submodule "expat/expat"]
3967
path = expat/expat
@@ -44,6 +72,11 @@
4472
sbom-url = https://github.com/libexpat/libexpat/
4573
sbom-description = Fast streaming XML parser written in C99
4674
sbom-hash = 454c6105bc2d0ea2521b8f8f7a5161c2abd8c386
75+
autoupdate = true
76+
autoupdate-branch = master
77+
autoupdate-tag-glob = R_[0-9]*_[0-9]*_[0-9]*
78+
autoupdate-manifest = expat/idf_component.yml
79+
autoupdate-ver-regex = R_([0-9]+)_([0-9]+)_([0-9]+)
4780

4881
[submodule "coap/libcoap"]
4982
path = coap/libcoap
@@ -54,13 +87,33 @@
5487
sbom-url = https://github.com/obgm/libcoap
5588
sbom-description = A CoAP (RFC 7252) implementation in C
5689
sbom-hash = c694baead2f9b408a7598e0b85c2f257ea8c9651
90+
autoupdate = true
91+
autoupdate-branch = develop
92+
autoupdate-tag-glob = v[0-9]*.[0-9]*.[0-9]*
93+
autoupdate-include-lightweight = true
94+
autoupdate-manifest = coap/idf_component.yml
95+
autoupdate-ver-regex = v([0-9]+).([0-9]+).([0-9]+)
5796

5897
[submodule "usb/usb_host_uvc/libuvc"]
5998
path = usb/usb_host_uvc/libuvc
6099
url = https://github.com/libuvc/libuvc.git
100+
autoupdate = true
101+
autoupdate-branch = master
102+
autoupdate-tag-glob = v[0-9]*.[0-9]*.[0-9]*
103+
autoupdate-include-lightweight = true
104+
# Not updating the manifest automatically,
105+
# since the component version is ahead of the upstream version
106+
61107
[submodule "eigen/eigen"]
62108
path = eigen/eigen
63109
url = https://gitlab.com/libeigen/eigen.git
110+
autoupdate = true
111+
autoupdate-branch = 3.4
112+
autoupdate-tag-glob = [0-9]*.[0-9]*.[0-9]*
113+
autoupdate-include-lightweight = true
114+
autoupdate-manifest = eigen/idf_component.yml
115+
autoupdate-ver-regex = ([0-9]+).([0-9]+).([0-9]+)
116+
64117
[submodule "fmt/fmt"]
65118
path = fmt/fmt
66119
url = https://github.com/fmtlib/fmt.git
@@ -70,13 +123,29 @@
70123
sbom-url = https://github.com/fmtlib/fmt/
71124
sbom-description = A modern formatting library
72125
sbom-hash = a33701196adfad74917046096bf5a2aa0ab0bb50
126+
autoupdate = true
127+
autoupdate-branch = master
128+
autoupdate-tag-glob = [0-9]*.[0-9]*.[0-9]*
129+
autoupdate-include-lightweight = true
130+
autoupdate-manifest = fmt/idf_component.yml
131+
autoupdate-ver-regex = ([0-9]+).([0-9]+).([0-9]+)
73132

74133
[submodule "esp_delta_ota/detools"]
75134
path = esp_delta_ota/detools
76135
url = https://github.com/eerimoq/detools.git
136+
# not updating automatically, as this is not an upstream repo
137+
# but a tool used by the component
138+
77139
[submodule "quirc/quirc"]
78140
path = quirc/quirc
79141
url = https://github.com/dlbeer/quirc.git
142+
autoupdate = true
143+
autoupdate-branch = master
144+
autoupdate-tag-glob = v[0-9]*.[0-9]*
145+
autoupdate-include-lightweight = true
146+
autoupdate-manifest = quirc/idf_component.yml
147+
autoupdate-ver-regex = v([0-9]+).([0-9]+)
148+
80149
[submodule "zlib/zlib"]
81150
path = zlib/zlib
82151
url = https://github.com/madler/zlib.git
@@ -86,6 +155,11 @@
86155
sbom-url = https://github.com/madler/zlib.git
87156
sbom-description = A massively spiffy yet delicately unobtrusive compression library
88157
sbom-hash = 04f42ceca40f73e2978b50e93806c2a18c1281fc
158+
autoupdate = true
159+
autoupdate-branch = master
160+
autoupdate-tag-glob = v[0-9]*.[0-9]*.[0-9]*
161+
autoupdate-manifest = zlib/idf_component.yml
162+
autoupdate-ver-regex = v([0-9]+).([0-9]+).([0-9]+)
89163

90164
[submodule "libpng/libpng"]
91165
path = libpng/libpng
@@ -96,3 +170,9 @@
96170
sbom-url = https://github.com/glennrp/libpng.git
97171
sbom-description = Portable Network Graphics support, official PNG reference library
98172
sbom-hash = 07b8803110da160b158ebfef872627da6c85cbdf
173+
autoupdate = true
174+
autoupdate-branch = libpng16
175+
autoupdate-include-lightweight = true
176+
autoupdate-tag-glob = v[0-9]*.[0-9]*.[0-9]*
177+
autoupdate-manifest = libpng/idf_component.yml
178+
autoupdate-ver-regex = v([0-9]+).([0-9]+).([0-9]+)

0 commit comments

Comments
 (0)