Skip to content

test: auto-update

test: auto-update #13

name: Merge camperbot PR's
on:
pull_request:
types: [opened, synchronize]
env:
GITHUB_TOKEN: ${{ secrets.CROWDIN_CAMPERBOT_PAT }}
jobs:
auto-merge:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
sparse-checkout: '.'
- name: Merge PR
run: |
pr_user=$(gh pr view ${{ github.event.pull_request.number }} --json author --jq '.author.login')
if [ "$pr_user" = "camperbot" ]; then
gh pr merge ${{ github.event.pull_request.number }} --merge
else
echo "PR author is not camperbot, skipping merge."
fi