Skip to content

Commit b0a249f

Browse files
committed
Add renovate workflow and config
Signed-off-by: Paul Guyot <pguyot@kallisys.net>
1 parent 45a7719 commit b0a249f

3 files changed

Lines changed: 164 additions & 0 deletions

File tree

.github/workflows/renovate.yaml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
#
2+
# Copyright 2026 Paul Guyot <pguyot@kallisys.net>
3+
#
4+
# SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later
5+
#
6+
7+
name: Renovate
8+
9+
on:
10+
push:
11+
paths:
12+
- 'renovate.json'
13+
branches:
14+
- main
15+
schedule:
16+
# Run every Monday at 06:00 UTC
17+
- cron: '0 6 * * 1'
18+
workflow_dispatch:
19+
inputs:
20+
dry_run:
21+
description: 'Dry run (log only, no PRs created)'
22+
type: boolean
23+
default: false
24+
25+
jobs:
26+
renovate:
27+
runs-on: ubuntu-24.04
28+
steps:
29+
- name: Checkout
30+
uses: actions/checkout@v4
31+
32+
- name: Run Renovate
33+
uses: renovatebot/github-action@v41
34+
with:
35+
configurationFile: renovate.json
36+
env:
37+
RENOVATE_TOKEN: ${{ secrets.RENOVATE_TOKEN }}
38+
LOG_LEVEL: ${{ inputs.dry_run == true && 'debug' || 'info' }}
39+
RENOVATE_DRY_RUN: ${{ inputs.dry_run == true && 'full' || '' }}

renovate.json

Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
{
2+
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
3+
"extends": ["config:recommended"],
4+
"labels": ["dependencies"],
5+
6+
"customManagers": [
7+
{
8+
"description": "mbedtls fetched via FetchContent",
9+
"customType": "regex",
10+
"fileMatch": ["^CMakeModules/FetchMbedTLS\\.cmake$"],
11+
"matchStrings": ["GIT_TAG\\s+v(?<currentValue>[^\\s\\n]+)"],
12+
"depNameTemplate": "mbed-TLS/mbedtls",
13+
"datasourceTemplate": "github-tags",
14+
"versioningTemplate": "semver"
15+
},
16+
{
17+
"description": "Unity test framework fetched via FetchContent",
18+
"customType": "regex",
19+
"fileMatch": ["^CMakeModules/FetchUnity\\.cmake$"],
20+
"matchStrings": ["GIT_TAG\\s+v(?<currentValue>[^\\s\\n]+)"],
21+
"depNameTemplate": "ThrowTheSwitch/Unity",
22+
"datasourceTemplate": "github-tags",
23+
"versioningTemplate": "semver"
24+
},
25+
{
26+
"description": "ARM CMSIS Core fetched via FetchContent",
27+
"customType": "regex",
28+
"fileMatch": ["^src/platforms/stm32/cmake/stm32_sdk\\.cmake$"],
29+
"matchStrings": ["cmsis_core\\.git\\s+GIT_TAG\\s+v(?<currentValue>[^\\s\\n]+)"],
30+
"depNameTemplate": "STMicroelectronics/cmsis_core",
31+
"datasourceTemplate": "github-tags",
32+
"versioningTemplate": "semver"
33+
},
34+
{
35+
"description": "STM32 family CMSIS device headers (first version in each _SDK_<family> pair). The dep name is derived from the family key: STMicroelectronics/cmsis_device_<family>. Exception: u3 uses hyphens (cmsis-device-u3) — overridden in packageRules.",
36+
"customType": "regex",
37+
"fileMatch": ["^src/platforms/stm32/cmake/stm32_sdk\\.cmake$"],
38+
"matchStrings": [
39+
"set\\(_SDK_(?<family>[a-z0-9]+)\\s+\"v(?<currentValue>[^;\"]+);[^\"]+\"\\)"
40+
],
41+
"depNameTemplate": "STMicroelectronics/cmsis_device_{{{family}}}",
42+
"datasourceTemplate": "github-tags",
43+
"versioningTemplate": "semver"
44+
},
45+
{
46+
"description": "STM32 family HAL drivers (second version in each _SDK_<family> pair). The dep name is derived from the family key: STMicroelectronics/stm32<family>xx_hal_driver. Exception: u3 uses hyphens (stm32u3xx-hal-driver) — overridden in packageRules.",
47+
"customType": "regex",
48+
"fileMatch": ["^src/platforms/stm32/cmake/stm32_sdk\\.cmake$"],
49+
"matchStrings": [
50+
"set\\(_SDK_(?<family>[a-z0-9]+)\\s+\"[^;]+;v(?<currentValue>[^\"]+)\"\\)"
51+
],
52+
"depNameTemplate": "STMicroelectronics/stm32{{{family}}}xx_hal_driver",
53+
"datasourceTemplate": "github-tags",
54+
"versioningTemplate": "semver"
55+
},
56+
{
57+
"description": "picolibc built from a release tarball by ExternalProject_Add",
58+
"customType": "regex",
59+
"fileMatch": ["^src/platforms/stm32/cmake/picolibc\\.cmake$"],
60+
"matchStrings": ["set\\(PICOLIBC_VERSION \"(?<currentValue>[^\"]+)\"\\)"],
61+
"depNameTemplate": "picolibc/picolibc",
62+
"datasourceTemplate": "github-releases",
63+
"versioningTemplate": "semver"
64+
},
65+
{
66+
"description": "esp-idf Docker image versions in esp32-build.yaml (semver-pinned entries only; release-v5.4 is intentionally left as a floating branch reference)",
67+
"customType": "regex",
68+
"fileMatch": ["^\\.github/workflows/esp32-build\\.yaml$"],
69+
"matchStrings": ["idf-version: 'v(?<currentValue>[0-9]+\\.[0-9]+\\.[0-9]+)'"],
70+
"depNameTemplate": "espressif/idf",
71+
"datasourceTemplate": "docker",
72+
"versioningTemplate": "semver"
73+
},
74+
{
75+
"description": "esp-idf Docker image version in esp32-mkimage.yaml (uses bare semver without v prefix)",
76+
"customType": "regex",
77+
"fileMatch": ["^\\.github/workflows/esp32-mkimage\\.yaml$"],
78+
"matchStrings": ["idf-version: \\[\"(?<currentValue>[0-9]+\\.[0-9]+\\.[0-9]+)\"\\]"],
79+
"depNameTemplate": "espressif/idf",
80+
"datasourceTemplate": "docker",
81+
"versioningTemplate": "semver"
82+
},
83+
{
84+
"description": "esp-idf Docker image versions in esp32-simtest.yaml (only the explicit idf-version entries in include/exclude blocks; the inline fromJSON array on the conditional line must be updated manually)",
85+
"customType": "regex",
86+
"fileMatch": ["^\\.github/workflows/esp32-simtest\\.yaml$"],
87+
"matchStrings": ["idf-version: \"v(?<currentValue>[0-9]+\\.[0-9]+\\.[0-9]+)\""],
88+
"depNameTemplate": "espressif/idf",
89+
"datasourceTemplate": "docker",
90+
"versioningTemplate": "semver"
91+
}
92+
],
93+
94+
"packageRules": [
95+
{
96+
"description": "Group all esp-idf updates into one PR so versions stay in sync across workflows",
97+
"matchPackageNames": ["espressif/idf"],
98+
"groupName": "esp-idf",
99+
"groupSlug": "esp-idf"
100+
},
101+
{
102+
"description": "Group all STM32 CMSIS device + HAL driver updates together",
103+
"matchPackagePatterns": ["^STMicroelectronics/(cmsis_device_|cmsis-device-|stm32.*_hal_driver|stm32.*-hal-driver)"],
104+
"groupName": "STM32 SDK (CMSIS device + HAL drivers)",
105+
"groupSlug": "stm32-sdk"
106+
},
107+
{
108+
"description": "u3 CMSIS device uses hyphens in the actual GitHub repo name",
109+
"matchPackageNames": ["STMicroelectronics/cmsis_device_u3"],
110+
"packageName": "STMicroelectronics/cmsis-device-u3"
111+
},
112+
{
113+
"description": "u3 HAL driver uses hyphens in the actual GitHub repo name",
114+
"matchPackageNames": ["STMicroelectronics/stm32u3xx_hal_driver"],
115+
"packageName": "STMicroelectronics/stm32u3xx-hal-driver"
116+
},
117+
{
118+
"description": "mbedtls is a security dependency — label prominently",
119+
"matchPackageNames": ["mbed-TLS/mbedtls"],
120+
"labels": ["security", "dependencies"]
121+
}
122+
]
123+
}

renovate.json.license

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later
2+
SPDX-FileCopyrightText: AtomVM Contributors

0 commit comments

Comments
 (0)