0
0
mirror of https://github.com/yanhao98/renovate-example.git synced 2026-02-04 13:40:34 +08:00
* chore(workflow): run weekly via schedule

* Add checkout step to workflow configuration

* Disable custom managers and commit body in default.json5

Commented out custom managers and commit body settings.
This commit is contained in:
严浩
2025-12-10 23:47:31 +08:00
committed by GitHub
parent 67a46c60e6
commit ba224d5483
6 changed files with 33 additions and 7462 deletions

View File

@@ -3,19 +3,24 @@ name: Check Renovate Configuration
on:
push:
workflow_dispatch:
schedule:
# Runs once weekly at 00:00 UTC on Sunday. GitHub schedule uses UTC time.
- cron: '0 0 * * 0'
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: yanhao98/composite-actions/setup-node-environment@main
- run: pnpm renovate-config-validator
- uses: actions/checkout@v4
- run: npx --yes --package renovate renovate-config-validator
if: always()
- run: pnpm run validator
- run: npx --yes --package renovate renovate-config-validator ./default.json5
if: always()
- run: pnpm run validator:strict
- run: npx --yes --package renovate -- renovate-config-validator ./default.json5 --strict
if: always()
- run: npx renovate --platform=local
if: always()
- run: pnpm run dry-run:npx
- run: npx renovate --platform=local --dry-run=full
if: always()
env:
LOG_LEVEL: debug

1
.npmrc
View File

@@ -1 +0,0 @@
# shamefully-hoist=true

View File

@@ -114,26 +114,26 @@
// major 更新需要人工确认
// { "matchUpdateTypes": ["major"], "dependencyDashboardApproval": true },
],
// "commitBody": "[skip ci]", // 根据 CI 配置调整
"customManagers": [
// https://semantic-release.gitbook.io/semantic-release/usage/installation#notes
/* === run: npx semantic-release@24.2.1 === */
{
"customType": "regex",
"description": "Update semantic-release version used by npx",
"managerFilePatterns": [ "^\\.github/workflows/[^/]+\\.ya?ml$", "^default\\.json5$" ],
"matchStrings": [ "\\srun: npx semantic-release@(?<currentValue>.*?)\\s" ],
"datasourceTemplate": "npm",
"depNameTemplate": "semantic-release"
},
{
"customType": "regex",
"description": "更新 .npmrc 中配置的 Node.js 版本。匹配 use-node-version=22.9.0",
"managerFilePatterns": [ "^\\.npmrc$" , "^default\\.json5$" ],
"matchStrings": [ "use-node-version=(?<currentValue>.*?)\\s" ],
"datasourceTemplate": "node",
"depNameTemplate": "node"
}
]
// "commitBody": "[skip ci]", // 根据 CI 配置调整
// "customManagers": [
// // https://semantic-release.gitbook.io/semantic-release/usage/installation#notes
// /* === run: npx semantic-release@24.2.1 === */
// {
// "customType": "regex",
// "description": "Update semantic-release version used by npx",
// "managerFilePatterns": [ "^\\.github/workflows/[^/]+\\.ya?ml$", "^default\\.json5$" ],
// "matchStrings": [ "\\srun: npx semantic-release@(?<currentValue>.*?)\\s" ],
// "datasourceTemplate": "npm",
// "depNameTemplate": "semantic-release"
// },
// {
// "customType": "regex",
// "description": "更新 .npmrc 中配置的 Node.js 版本。匹配 use-node-version=22.9.0",
// "managerFilePatterns": [ "^\\.npmrc$" , "^default\\.json5$" ],
// "matchStrings": [ "use-node-version=(?<currentValue>.*?)\\s" ],
// "datasourceTemplate": "node",
// "depNameTemplate": "node"
// }
// ]
}

View File

@@ -1,24 +0,0 @@
{
"packageManager": "pnpm@10.24.0",
"scripts": {
"validator": "renovate-config-validator ./default.json5",
"validator:strict": "renovate-config-validator ./default.json5 --strict",
"validator:npx": "npx --yes --package renovate -- renovate-config-validator --strict",
"dry-run:npx": "LOG_LEVEL=debug npx renovate --platform=local --dry-run=full",
"test-regex": "bun --bun test-regex/run.mjs"
},
"devDependencies": {
"renovate": "^42.0.0",
"vue-memoize-dict": "https://pkg.pr.new/yanhao98/vue-memoize-dict@77d83e6"
},
"renovate": {
"extends": [
"https://git.1-h.cc/examples/renovate-example/raw/branch/main/default.json5"
]
},
"pnpm": {
"onlyBuiltDependencies": [
"re2"
]
}
}

7408
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,3 +1,5 @@
// bun --bun test-regex/run.mjs
import * as path from "node:path";
import { fileURLToPath } from "node:url";
import fs from "node:fs";
@@ -23,6 +25,3 @@ const filecontent = fs.readFileSync(path.join(__dirname, "file.txt"), "utf8");
const regex = "^\\.github/workflows/[^/]+\\.ya?ml$";
extractMatchResult(regex, ".github/workflows/中 | 文 : 文件名.yaml");
})();
// TODO: run.mjs regex file