test: auto-update #13
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
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 |