Files
avo/.github/workflows/pr.yml
Michael McLoughlin e3b49f1a29 ci: do not auto-merge draft pull requests (#282)
Provide a mechanism for testing workflows that create pull requests.
2022-05-08 15:50:22 -07:00

21 lines
635 B
YAML

name: pr
permissions:
contents: read
on:
pull_request:
jobs:
automerge:
runs-on: ubuntu-latest
steps:
- name: Generate Bot Token
uses: tibdex/github-app-token@586e1a624db6a5a4ac2c53daeeded60c5e3d50fe # v1.5.2
id: bot
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.APP_PRIVATE_KEY }}
- name: Automerge Bot Pull Requests
if: github.actor == 'cadobot[bot]' && !github.event.pull_request.draft
run: gh pr merge --auto --squash "${{ github.event.pull_request.html_url }}"
env:
GITHUB_TOKEN: ${{ steps.bot.outputs.token }}