-
Notifications
You must be signed in to change notification settings - Fork 4
feat:自動でvalidationするCIを追加 #1203
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
DiffNo diff detected! |
| - "renovate-bot.js" | ||
| - "renovate/**" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
パスが違う気がします
| - "renovate-bot.js" | |
| - "renovate/**" | |
| - ".github/renovate-bot.js" | |
| - ".github/renovate/**" |
| validate: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
最新にするのが良いです
https://github.com/actions/checkout/releases
| - uses: actions/checkout@v4 | |
| - uses: actions/checkout@v5 |
|
| - uses: actions/checkout@v5 | ||
|
|
||
| - name: Validate renovate-bot.js | ||
| if: ${{ exists('renovate-bot.js') }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
exists()という機能はないらしいです(GitHub Actions拡張機能を入れると解析してくれます)
${{ hashFiles('.github/renovate-bot.js') != '' }}みたいな感じにするといいかもです
| if: ${{ exists('renovate-bot.js') }} | |
| if: ${{ hashFiles('.github/renovate-bot.js') != '' }} |
| - name: Validate renovate directory configs | ||
| run: | | ||
| find renovate -type f -name '*.json' -exec npx --yes renovate-config-validator {} \; No newline at end of file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
findするディレクトリが違いそうです
find .github/renovateにするか、working-directoryで実行ディレクトリを指定できるのでどちらかをするといいです
| - name: Validate renovate directory configs | |
| run: | | |
| find renovate -type f -name '*.json' -exec npx --yes renovate-config-validator {} \; | |
| - name: Validate renovate directory configs | |
| working-directory: .github/renovate | |
| run: | | |
| find . -type f -name '*.json' -exec npx --yes renovate-config-validator {} \; |
| - name: Validate renovate-bot.js | ||
| if: ${{ hashFiles('.github/renovate-bot.js') != '' }} | ||
| run: | | ||
| npx --yes renovate-config-validator renovate-bot.js |
There was a problem hiding this comment.
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
にしたらと言われたのですがどうしますか
一応ちゃんと見ましたが、AIに任せた部分が多いので正しいか分からないです
#1109
質問
・.yamlの名前はvalidate-renovate-config.yamlでいいですか
・jobsの中のvalidateはcheckがいいですか(参考資料がcheckになっている)
・actions/checkout@v4よりもactions/checkout@v3の方がいいですか(参考資料がv3になっている)
・今は対象ファイルを二つのステップで分けていますが一つの方がいいですか