From a99aaf6cef893be038aa9f188a795f1a97b866cb Mon Sep 17 00:00:00 2001 From: RogerLamTd Date: Fri, 10 Jan 2025 15:18:11 +0800 Subject: [PATCH] fix(repo): fix soft blocks api workflow --- .github/workflows/taiko-client--pages.yml | 21 ++++++++++++++----- .../taiko-client/driver/soft_blocks/server.go | 4 ++-- 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/.github/workflows/taiko-client--pages.yml b/.github/workflows/taiko-client--pages.yml index 6a829504df9..07bb4710f0f 100644 --- a/.github/workflows/taiko-client--pages.yml +++ b/.github/workflows/taiko-client--pages.yml @@ -1,13 +1,24 @@ -name: "Taiko Client Github Pages" +name: "Taiko Client Soft Blocks Documentation" on: + pull_request: + types: [opened, synchronize, reopened, ready_for_review] + paths: + - "packages/taiko-client/driver/soft_blocks/**" + - "packages/taiko-client/docs/**" + branches-ignore: + - release-please--branches--** + - dependabot/** + push: - branches: [main] + branches: + - main paths: - - "packages/taiko-client/**" + - "packages/taiko-client/docs/**" jobs: swagger-gen: + if: github.event_name == 'pull_request' runs-on: [arc-runner-set] steps: - name: Checkout code @@ -38,7 +49,7 @@ jobs: git config --global user.email "github-actions[bot]@users.noreply.github.com" if ! git diff --quiet; then git add -u - git commit -m "Update Swagger documentation" + git commit -m "chore(taiko-client): update swagger documentation" git push origin HEAD:${{ github.ref_name }} else echo "No changes to commit" @@ -46,8 +57,8 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} deploy: + if: github.event_name == 'push' && github.ref == 'refs/heads/main' runs-on: [arc-runner-set] - needs: swagger-gen permissions: contents: write steps: diff --git a/packages/taiko-client/driver/soft_blocks/server.go b/packages/taiko-client/driver/soft_blocks/server.go index e27cac912fd..09cd9e702d1 100644 --- a/packages/taiko-client/driver/soft_blocks/server.go +++ b/packages/taiko-client/driver/soft_blocks/server.go @@ -37,7 +37,7 @@ type softBlockChainSyncer interface { // @license.name MIT // @license.url https://github.com/taikoxyz/taiko-mono/blob/main/LICENSE.md -// SoftBlockAPIServer represents a soft blcok server instance. +// SoftBlockAPIServer represents a soft block server instance. type SoftBlockAPIServer struct { echo *echo.Echo chainSyncer softBlockChainSyncer @@ -46,7 +46,7 @@ type SoftBlockAPIServer struct { checkSig bool } -// New creates a new soft blcok server instance, and starts the server. +// New creates a new soft block server instance, and starts the server. func New( cors string, jwtSecret []byte,