Tweak auto-merging workflow #22
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# GitHub ActionsでのDependabotの自動化 - GitHub Docs | |
# https://docs.github.com/ja/code-security/dependabot/working-with-dependabot/automating-dependabot-with-github-actions#pull-request%E3%81%AE%E8%87%AA%E5%8B%95%E3%83%9E%E3%83%BC%E3%82%B8%E3%82%92%E6%9C%89%E5%8A%B9%E5%8C%96%E3%81%99%E3%82%8B | |
name: Dependabot auto-merge | |
on: pull_request | |
permissions: | |
pull-requests: write | |
contents: write | |
jobs: | |
dependabot-auto-merge: | |
runs-on: ubuntu-latest | |
if: github.event.pull_request.user.login == 'dependabot[bot]' && github.repository == 'ackintosh/ray' | |
steps: | |
- name: Dependabot metadata | |
id: metadata | |
uses: dependabot/fetch-metadata@v1 | |
with: | |
github-token: '${{ secrets.GITHUB_TOKEN }}' | |
- name: Enable auto-merge for Dependabot PRs | |
if: ${{ steps.metadata.outputs.update-type == 'version-update:semver-patch' }} | |
run: gh pr merge --auto --merge "$PR_URL" | |
env: | |
PR_URL: ${{github.event.pull_request.html_url}} | |
GH_TOKEN: ${{secrets.GITHUB_TOKEN}} |