Skip to content

Release: Version 2.12-RC1 #3

Release: Version 2.12-RC1

Release: Version 2.12-RC1 #3

Workflow file for this run

name: Release PR auto-merge
on: pull_request
permissions:
contents: write
pull-requests: write
jobs:
dependabot:
runs-on: ubuntu-latest
if: ${{ github.actor == 'github-actions[bot]'}}
steps:
- name: Check PR Title
run: |
PR_TITLE="${{ github.event.pull_request.title }}"
REQUIRED_PREFIX="Release: Bump version to"
if [[ ! "$PR_TITLE" == "$REQUIRED_PREFIX"* ]]; then
echo "::error::PR title does not start with \"$REQUIRED_PREFIX\""
echo "Current PR title: \"$PR_TITLE\""
exit 1
fi
echo "PR title check passed."
- name: Approve a PR
run: gh pr review --approve "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
# Enable for automerge
- name: Enable auto-merge for Dependabot PRs
run: gh pr merge --auto --merge "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}