mirror of
https://github.com/keymanapp/keyman.git
synced 2026-08-05 00:15:32 +00:00
In order to avoid a race condition where label can be added after the GHA starts, we will check the branch name instead of `automerge` label. Fixes: #15027 Test-bot: skip Build-bot: skip
29 lines
1.1 KiB
YAML
29 lines
1.1 KiB
YAML
#
|
|
# Automatically merges pull requests opened by keyman-server The initial use of
|
|
# this action is to increment the patch version of Keyman with
|
|
# resources/teamcity/triggers/trigger-release-builds.sh. That script creates a PR and
|
|
# then this workflow will be triggered to approve the PR (from github-actions
|
|
# account), and then automerge it.
|
|
#
|
|
name: Auto Merge PRs from keyman-server
|
|
on:
|
|
pull_request:
|
|
types: [opened]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
if: ${{ github.repository == 'keymanapp/keyman' && github.actor == 'keyman-server' && startsWith(github.head_ref, 'auto/') }}
|
|
steps:
|
|
- name: auto approve PR from keyman-server
|
|
shell: bash
|
|
env:
|
|
GH_TOKEN: "${{ github.token }}"
|
|
run: |
|
|
gh pr review -R keymanapp/keyman --approve ${{ github.event.pull_request.number }}
|
|
- name: mark PR for auto-merge from keyman-server
|
|
shell: bash
|
|
env:
|
|
GH_TOKEN: "${{ secrets.AUTOINC_GITHUB_TOKEN }}"
|
|
run: |
|
|
gh pr merge -R keymanapp/keyman --merge --auto ${{ github.event.pull_request.number }}
|