-
Notifications
You must be signed in to change notification settings - Fork 1
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
Automatically merge dependabot PRs #151
Conversation
with: | ||
github-token: '${{ secrets.GITHUB_TOKEN }}' | ||
- name: Approve and merge | ||
# if: ${{steps.metadata.outputs.update-type != 'version-update:semver-major'}} |
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.
go の versioning でどうなのかあんまわかっていないながら、一応CI入れたし全部マージで良いのかなーとコメントアウトしておきました
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.
ただ、現状だと go に絞ってないので github actions の更新もオートマージになります
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.
全部オートマージでおっけーです (ぶっ壊れたら治すの精神)
run: gh pr review --approve "$PR_URL" && gh pr merge --auto --squash "$PR_URL" | ||
env: | ||
PR_URL: ${{github.event.pull_request.html_url}} | ||
GITHUB_TOKEN: '${{secrets.GITHUB_TOKEN}}' |
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.
GITHUB_TOKEN: '${{secrets.GITHUB_TOKEN}}' | |
GITHUB_TOKEN: '${{ secrets.PERSONAL_ACCESS_TOKEN }}' |
こうすると、マージ後にもCI/CDが走ってデプロイまでされる筈
自分はあまりPATを使わないか、https://github.com/tibdex/github-app-token でワンショットのトークン生成させる事が多いのだけれど、このリポジトリにはすでに設定があるし良いと思います。
記載の通り repository の設定を更新しました! |
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.
Thank you! やっていき
🤖 ザマス |
dependabot の PR を auto merge したいということだったので、自分が使ってるやり方のPRを一応出しておきます。
サードパーティのマージアクションとかアプリもあると思うので、他のやり方にするならこのPRは閉じちゃってください。
https://github.com/pankona/pankona.github.com/settings => Allow auto-merge
https://github.com/pankona/pankona.github.com/settings/actions => Allow GitHub Actions to create and approve pull requests
二箇所の設定変更チェックが必要です。(Approve は必須にして無さそうなので、コードから抜いてもいいです)