Skip to content

Commit 3d60e7a

Browse files
authored
ci: image ver auto update (#281)
* feat(ci): add docker image tag updater * feat(ci): add docker image tag updater * fix(renovate): ignore GitHub Actions bot
1 parent 5b0765b commit 3d60e7a

2 files changed

Lines changed: 89 additions & 0 deletions

File tree

.github/renovate-openim.json5

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
{
2+
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
3+
"extends": ["config:recommended"],
4+
"enabledManagers": ["custom.regex"],
5+
"dependencyDashboard": false,
6+
"branchPrefix": "renovate-bot/",
7+
"commitMessagePrefix": "chore(deps):",
8+
"prConcurrentLimit": 1,
9+
"gitIgnoredAuthors": ["41898282+github-actions[bot]@users.noreply.github.com"],
10+
11+
"customManagers": [
12+
{
13+
"customType": "regex",
14+
"description": "Update OpenIM Docker image tags in .env",
15+
"fileMatch": ["^\\.env$"],
16+
"datasourceTemplate": "docker",
17+
"matchStrings": [
18+
"(?:^|\\n)OPENIM_WEB_FRONT_IMAGE=(?<depName>openim/openim-web-front):(?<currentValue>[^\\s#]+)",
19+
"(?:^|\\n)OPENIM_ADMIN_FRONT_IMAGE=(?<depName>openim/openim-admin-front):(?<currentValue>[^\\s#]+)",
20+
"(?:^|\\n)OPENIM_SERVER_IMAGE=(?<depName>openim/openim-server):(?<currentValue>[^\\s#]+)",
21+
"(?:^|\\n)OPENIM_CHAT_IMAGE=(?<depName>openim/openim-chat):(?<currentValue>[^\\s#]+)"
22+
]
23+
}
24+
],
25+
26+
"packageRules": [
27+
{
28+
"matchDatasources": ["docker"],
29+
"matchPackageNames": [
30+
"openim/openim-web-front",
31+
"openim/openim-admin-front",
32+
"openim/openim-server",
33+
"openim/openim-chat"
34+
],
35+
"groupName": "OpenIM Docker images",
36+
"groupSlug": "openim-images"
37+
},
38+
{
39+
"matchDatasources": ["docker"],
40+
"matchPackageNames": [
41+
"openim/openim-web-front",
42+
"openim/openim-admin-front"
43+
],
44+
"allowedVersions": "/^release-v\\d+\\.\\d+\\.\\d+(?:-patch\\.\\d+)?$/",
45+
"versioning": "regex:^release-v(?<major>\\d+)\\.(?<minor>\\d+)\\.(?<patch>\\d+)(?:-patch\\.(?<build>\\d+))?$"
46+
},
47+
{
48+
"matchDatasources": ["docker"],
49+
"matchPackageNames": [
50+
"openim/openim-server",
51+
"openim/openim-chat"
52+
],
53+
"allowedVersions": "/^v\\d+\\.\\d+\\.\\d+(?:-patch\\.\\d+)?$/",
54+
"versioning": "regex:^v(?<major>\\d+)\\.(?<minor>\\d+)\\.(?<patch>\\d+)(?:-patch\\.(?<build>\\d+))?$"
55+
}
56+
]
57+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Update OpenIM Image Tags
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: "0 3 * * 1"
7+
8+
concurrency:
9+
group: update-openim-image-tags
10+
cancel-in-progress: true
11+
12+
jobs:
13+
renovate:
14+
name: Check OpenIM image tags
15+
runs-on: ubuntu-latest
16+
permissions:
17+
contents: write
18+
pull-requests: write
19+
20+
steps:
21+
- name: Checkout repository
22+
uses: actions/checkout@v7
23+
24+
- name: Run Renovate
25+
uses: renovatebot/github-action@v46.1.17
26+
with:
27+
configurationFile: .github/renovate-openim.json5
28+
token: ${{ github.token }}
29+
env:
30+
RENOVATE_ONBOARDING: "false"
31+
RENOVATE_REQUIRE_CONFIG: ignored
32+
RENOVATE_REPOSITORIES: ${{ github.repository }}

0 commit comments

Comments
 (0)