From 5c3d9a3f1b51335b3b5694332bb2bf2254f7b32d Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Mon, 13 Jul 2020 13:11:34 +0200 Subject: [PATCH] automatic-resolve: Run if dispatched instead of by schedule --- .github/workflows/automatic-resolve.yml | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/.github/workflows/automatic-resolve.yml b/.github/workflows/automatic-resolve.yml index 75241f4b..1d8c8857 100644 --- a/.github/workflows/automatic-resolve.yml +++ b/.github/workflows/automatic-resolve.yml @@ -1,23 +1,14 @@ name: Automatic Resolve on: - schedule: - # Every day at UTC+8 midnight - - cron: "5 8 * * *" - # Every day at UTC+4 midnight - - cron: "5 4 * * *" - # Every day at UTC midnight - - cron: "5 0 * * *" - # Every day at UTC-4 midnight - - cron: "5 20 * * *" - # Every day at UTC-8 midnight - - cron: "5 16 * * *" + repository_dispatch: + types: + - resolve-command jobs: resolve-conflicts: name: Automatic Conflict Resolution runs-on: ubuntu-latest - if: github.repository == 'Icinga/L10n' steps: - name: Checkout code base @@ -35,7 +26,8 @@ jobs: git config user.name "icingabot" git config user.email "65761963+icingabot@users.noreply.github.com" - - name: Resolve conflicting pull requests + - name: Resolve conflicting pull request run: bin/autoresolve env: ICINGABOT_TOKEN: "${{ secrets.ICINGABOT_TOKEN }}" + PULL_REQUEST_NO: "${{ github.event.client_payload.pull_request.number }}"