From dfa78eea0f6b2f234145b25f48c3345b283a81fe Mon Sep 17 00:00:00 2001 From: Dennis-Nedry-From-Jurassic-Park Date: Fri, 22 Apr 2022 10:37:57 +0300 Subject: [PATCH] - https://stackoverflow.com/a/66206183 - https://github.com/pascalgn/automerge-action/issues/170#issuecomment-1026891812 --- .github/workflows/automerge.yaml | 30 ++++++++++++++------------- .github/workflows/build_and_test.yaml | 17 ++++++++++++++- 2 files changed, 32 insertions(+), 15 deletions(-) diff --git a/.github/workflows/automerge.yaml b/.github/workflows/automerge.yaml index 094777f..1e13927 100644 --- a/.github/workflows/automerge.yaml +++ b/.github/workflows/automerge.yaml @@ -1,20 +1,22 @@ # https://github.com/pascalgn/automerge-action name: "Automerge" on: - pull_request: - types: - - labeled - - unlabeled - - synchronize - - opened - - edited - - ready_for_review - - reopened - - unlocked - check_suite: - types: - - completed - status: {} + repository_dispatch: + types: [ checks-complete ] +# pull_request: +# types: +# - labeled +# - unlabeled +# - synchronize +# - opened +# - edited +# - ready_for_review +# - reopened +# - unlocked +# check_suite: +# types: +# - completed +# status: {} jobs: automerge: diff --git a/.github/workflows/build_and_test.yaml b/.github/workflows/build_and_test.yaml index 68fdb6c..8a75981 100644 --- a/.github/workflows/build_and_test.yaml +++ b/.github/workflows/build_and_test.yaml @@ -76,4 +76,19 @@ jobs: - uses: actions/checkout@v2 - run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }} - run: cargo build --verbose - - run: cargo test --verbose \ No newline at end of file + - run: cargo test --verbose + + checks_complete: + name: Trigger automerge + runs-on: ubuntu-latest + needs: + - check + - coverage + - build_and_test + steps: + - name: Trigger automerge + uses: peter-evans/repository-dispatch@v1 + with: + token: ${{ secrets.ACCESS_TOKEN }} + event-type: checks-complete + if: github.event_name != 'push' \ No newline at end of file