diff --git a/.github/workflows/Automerge.yml b/.github/workflows/Automerge.yml new file mode 100644 index 0000000..228632e --- /dev/null +++ b/.github/workflows/Automerge.yml @@ -0,0 +1,29 @@ +name: Automerge + +on: + pull_request: + push: + schedule: + - cron: '0 0 * * *' + workflow_dispatch: + +jobs: + + + Pipeline: + if: ${{ !(github.event_name != 'pull_request' && github.actor == 'dependabot[bot]') }} + uses: ./.github/workflows/sphinx-tuttest.yml + + + Automerge: + needs: Pipeline + if: github.event_name == 'pull_request' && github.actor == 'dependabot[bot]' + runs-on: ubuntu-latest + name: Automerge dependabot PRs + permissions: + contents: write + + steps: + + - name: Auto-merge Dependabot PR + run: GITHUB_TOKEN='${{ github.token }}' gh pr merge '${{ github.event.pull_request.html_url }}' --squash diff --git a/.github/workflows/sphinx-tuttest.yml b/.github/workflows/sphinx-tuttest.yml index 0045d4e..5c7e455 100644 --- a/.github/workflows/sphinx-tuttest.yml +++ b/.github/workflows/sphinx-tuttest.yml @@ -1,10 +1,7 @@ name: doc-test on: - push: - pull_request: - schedule: - - cron: "0 0 * * *" + workflow_call: jobs: