mirror of
https://github.com/Crocmagnon/cookiecutter-django.git
synced 2024-11-05 14:33:55 +01:00
33 lines
826 B
YAML
33 lines
826 B
YAML
name: Test & auto merge
|
|
|
|
on:
|
|
pull_request:
|
|
branches: [ "master" ]
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
tests:
|
|
uses: ./.github/workflows/test.yaml
|
|
auto_merge:
|
|
name: Auto merge
|
|
runs-on: ubuntu-latest
|
|
needs: tests
|
|
permissions:
|
|
pull-requests: write
|
|
contents: write
|
|
env:
|
|
GH_TOKEN: {% raw %}${{ github.token }}{% endraw %}
|
|
if: >-
|
|
github.event.pull_request
|
|
&& github.event.pull_request.merged == false
|
|
&& (
|
|
github.event.pull_request.user.login == 'crocmagnon-pr[bot]'
|
|
|| github.event.pull_request.user.login == 'pre-commit-ci[bot]'
|
|
)
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
- name: Auto merge
|
|
run: gh pr merge {% raw %}${{github.event.pull_request.number}}{% endraw %} --delete-branch --rebase
|