From 29e51fc97d4e088e78ce8d29d4bd1b32d4f2abcc Mon Sep 17 00:00:00 2001 From: Unai Martinez-Corral Date: Thu, 7 Apr 2022 00:46:31 +0200 Subject: [PATCH] ci: add Automerge and convert sphinx-tuttest to a reusable workflow Signed-off-by: Unai Martinez-Corral --- .github/workflows/Automerge.yml | 29 ++++++++++++++++++++++++++++ .github/workflows/sphinx-tuttest.yml | 5 +---- 2 files changed, 30 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/Automerge.yml 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: