From b4aee035dd40d98e8cd0d75115dca9b9d1671a7d Mon Sep 17 00:00:00 2001 From: Nikita Skrynnik Date: Tue, 8 Nov 2022 17:06:21 +0700 Subject: [PATCH] add automerge reusable workflow Signed-off-by: Nikita Skrynnik --- .github/workflows/automerge.yaml | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/.github/workflows/automerge.yaml b/.github/workflows/automerge.yaml index 4d24fc0..4d902b5 100644 --- a/.github/workflows/automerge.yaml +++ b/.github/workflows/automerge.yaml @@ -8,23 +8,7 @@ on: - 'ci' jobs: automerge: - name: Automerge - runs-on: ubuntu-latest - if: ${{ github.event.workflow_run.conclusion == 'success' && github.actor == 'nsmbot' }} - steps: - - name: Check out the code - uses: actions/checkout@v2 - - name: Fetch main - run: | - git remote -v - git fetch --depth=1 origin main - - name: Only allow go.mod, go.sum, *.gen.go files - run: | - find . -type f ! -name 'go.mod' ! -name 'go.sum' -exec git diff --exit-code origin/main -- {} + - - name: Merge PR - uses: ridedott/merge-me-action@master - with: - GITHUB_LOGIN: nsmbot - ENABLED_FOR_MANUAL_CHANGES: true - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - MAXIMUM_RETRIES: 25 + if: ${{ github.event.workflow_run.conclusion == 'success' && github.actor == 'nsmbot'}} + uses: networkservicemesh/.github/.github/workflows/automerge.yaml@main + secrets: + token: ${{ secrets.NSM_BOT_GITHUB_TOKEN }}