Conversation
|
Preview (prod backend + PR dashboard) → https://1140.ns-preview.trapti.tech/ |
There was a problem hiding this comment.
Pull request overview
This PR adds automated triggering of Renovate in the manifest repository immediately after Docker images are built and published during the release workflow. This ensures that the manifest repository is updated promptly when new images become available.
Key Changes:
- Added a new
renovatejob to the release workflow that triggers after theimagejob completes - Uses GitHub API to dispatch the Renovate workflow in the traPtitech/manifest repository
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| - run: 'gh api --method POST -H "Accept: application/vnd.github+json" /repos/traPtitech/manifest/actions/workflows/renovate.yaml/dispatches -f "ref=main"' | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }} |
There was a problem hiding this comment.
This workflow uses a raw gh api command while the existing release-helm.yaml workflow (lines 92-101) uses actions/github-script@v8 with github.rest.actions.createWorkflowDispatch for the same purpose. Using actions/github-script is more explicit, type-safe, and maintainable. Consider using the same approach for consistency across the codebase.
| - run: 'gh api --method POST -H "Accept: application/vnd.github+json" /repos/traPtitech/manifest/actions/workflows/renovate.yaml/dispatches -f "ref=main"' | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }} | |
| - name: Dispatch Renovate workflow | |
| uses: actions/github-script@v8 | |
| with: | |
| github-token: ${{ secrets.PAT_TOKEN }} | |
| script: | | |
| await github.rest.actions.createWorkflowDispatch({ | |
| owner: 'traPtitech', | |
| repo: 'manifest', | |
| workflow_id: 'renovate.yaml', | |
| ref: 'main' | |
| }); |
| contents: read | ||
| actions: write | ||
| steps: | ||
| - run: 'gh api --method POST -H "Accept: application/vnd.github+json" /repos/traPtitech/manifest/actions/workflows/renovate.yaml/dispatches -f "ref=main"' |
There was a problem hiding this comment.
The step is missing a name attribute. Consider adding a descriptive name like "Dispatch Renovate workflow" or "Trigger manifest Renovate" for better workflow visibility and debugging in the GitHub Actions UI.
| generate_release_notes: true | ||
|
|
||
| renovate: | ||
| name: Run Renovate on manifest repo |
There was a problem hiding this comment.
The renovate job will run on all workflow triggers (push to main branch, tag pushes, and workflow_call), but it should only run when an image is actually tagged and released. Consider adding the same condition as the release job to ensure the Renovate dispatch only occurs for actual releases. Without this condition, Renovate will be triggered unnecessarily on every push to the main branch.
| name: Run Renovate on manifest repo | |
| name: Run Renovate on manifest repo | |
| if: ${{ github.event_name == 'push' && github.ref_type == 'tag' || inputs.ref_name != '' }} |
なぜやるか
イメージがビルドされたらRenovateが速やかにアップデートPRを作成するようにするため
やったこと
リリース時のCIにRenovateを回すstepを追加
やらなかったこと
特になし
資料
https://github.com/traPtitech/traQ/blob/1ed60aba12479d2d773b33f3469e838046912760/.github/workflows/release.yml#L62-L72