From 137c711a6b71cf22adc15c06489c919a0a925138 Mon Sep 17 00:00:00 2001 From: Anh Nguyen Date: Wed, 28 Feb 2024 15:46:04 +0700 Subject: [PATCH] ci: update rules for linter and abi generator --- .github/workflows/abi-gen.yaml | 9 ++++----- .github/workflows/lint.yaml | 8 ++++++-- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/workflows/abi-gen.yaml b/.github/workflows/abi-gen.yaml index b98542d..1df3200 100644 --- a/.github/workflows/abi-gen.yaml +++ b/.github/workflows/abi-gen.yaml @@ -1,13 +1,12 @@ name: Generate ABIs on: - pull_request: - branches: [ main ] - paths: - - '**/*.sol' + pull_request_review: + types: [submitted] jobs: gen-abi: + if: github.event.review.state == 'APPROVED' runs-on: ubuntu-latest permissions: contents: write @@ -31,7 +30,7 @@ jobs: - name: Install abigen run: | - go install github.com/ethereum/go-ethereum/cmd/abigen@1.13.14 + go install github.com/ethereum/go-ethereum/cmd/abigen@latest - name: Write secret.json file env: diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index a3ba11a..30c9ff5 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -1,6 +1,10 @@ name: Solidity Lint -on: [pull_request] +on: + pull_request: + branches: [ main ] + paths: + - '**/*.sol' jobs: solidity-lint: @@ -31,4 +35,4 @@ jobs: env: REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - reviewdog -f=sarif -name="solhint" -reporter=github-pr-review -filter-mode=added < solhint-report.txt + reviewdog -f=sarif -name="solhint" -reporter=github-pr-review -filter-mode=added < solhint-report.txt \ No newline at end of file