Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions .github/workflows/validate-renovate-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Validate Renovate Config

on:
pull_request:
paths:
- "renovate-bot.js"
- "renovate/**"

jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Validate renovate-bot.js
if: ${{ exists('renovate-bot.js') }}
run: |
npx --yes renovate-config-validator renovate-bot.js
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

とりあえず言われた二か所は直しました。AIに、
変更前:
npx --yes renovate-config-validator renovate-bot.js
変更後:
npx --yes renovate-config-validator .github/renovate-bot.js
にしたらと言われたのですがどうしますか

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AIが正しそうなので、そうしましょう。気づかなかった...🙇

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

公式ドキュメント見ると
npx --yes renovate-config-validator .github/renovate-bot.js
より
npx --yes --package renovate -- renovate-config-validator .github/renovate-bot.js
ですかね?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

正しそうです、そうしましょう


- name: Validate renovate directory configs
run: |
find renovate -type f -name '*.json' -exec npx --yes renovate-config-validator {} \;

- name: Post success comment on PR
if: success()
uses: actions/github-script@v7
with:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: 'Renovate設定ファイルのバリデーションに成功しました :white_check_mark:'
})

- name: Post failure comment on PR
if: failure()
uses: actions/github-script@v7
with:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: 'Renovate設定ファイルのバリデーションに失敗しました :x: 詳細はActionsのログを確認してください。'
})