diff --git a/.github/workflows/gomod2nix.yml b/.github/workflows/gomod2nix.yml index ed559b8a..4ab92cbe 100644 --- a/.github/workflows/gomod2nix.yml +++ b/.github/workflows/gomod2nix.yml @@ -1,6 +1,8 @@ name: 自动更新 nix 依赖 on: push: + branches: + - master paths: - 'go.mod' - 'go.sum' @@ -23,6 +25,7 @@ jobs: - name: Check out code into the Go module directory uses: actions/checkout@master with: + ref: master fetch-depth: 0 - name: gomod2nix update diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index a635aa39..2143d00b 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -1,5 +1,8 @@ name: PushLint -on: [ push ] +on: + push: + branches: + - master jobs: golangci: name: lint @@ -13,6 +16,7 @@ jobs: - name: Check out code into the Go module directory uses: actions/checkout@master with: + ref: master fetch-depth: 0 - name: Tidy Modules