From 711a4a9d7a458ea19b925683fea068a65e427f72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=A9=E5=85=83?= Date: Tue, 16 Mar 2021 15:35:13 +0800 Subject: [PATCH] configure ci to skip duplicate job --- .github/workflows/go.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 1d435e823..fbc0cfbb6 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -20,8 +20,25 @@ env: jobs: + detect-noop: + runs-on: ubuntu-20.04 + outputs: + noop: ${{ steps.noop.outputs.should_skip }} + steps: + - name: Detect No-op Changes + id: noop + uses: fkirc/skip-duplicate-actions@v3.3.0 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + paths_ignore: '["**.md", "**.png", "**.jpg"]' + do_not_skip: '["workflow_dispatch", "schedule", "push"]' + concurrent_skipping: false + unit-tests: runs-on: ubuntu-20.04 + needs: detect-noop + if: needs.detect-noop.outputs.noop != 'true' + steps: - name: Set up Go 1.14 uses: actions/setup-go@v1 @@ -66,6 +83,9 @@ jobs: compatibility-test: runs-on: ubuntu-20.04 + needs: detect-noop + if: needs.detect-noop.outputs.noop != 'true' + steps: - name: Set up Go 1.14 uses: actions/setup-go@v1 @@ -105,6 +125,9 @@ jobs: e2e-tests: runs-on: aliyun + needs: detect-noop + if: needs.detect-noop.outputs.noop != 'true' + steps: - name: Check out code into the Go module directory uses: actions/checkout@v2 @@ -161,6 +184,8 @@ jobs: staticcheck: runs-on: ubuntu-20.04 + needs: detect-noop + if: needs.detect-noop.outputs.noop != 'true' steps: - name: Checkout @@ -180,6 +205,8 @@ jobs: lint: runs-on: ubuntu-20.04 + needs: detect-noop + if: needs.detect-noop.outputs.noop != 'true' steps: - name: Checkout @@ -205,6 +232,8 @@ jobs: check-diff: runs-on: ubuntu-20.04 + needs: detect-noop + if: needs.detect-noop.outputs.noop != 'true' steps: - name: Checkout