signer: do not fail back to the preferred node until it has caught up #13
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Proto | |
| on: | |
| push: | |
| branches: ["main"] | |
| pull_request: | |
| branches: ["main"] | |
| permissions: | |
| contents: read | |
| jobs: | |
| drift: | |
| name: generated code up to date | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 | |
| - name: Set up Go | |
| uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5.6.0 | |
| with: | |
| go-version-file: go.mod | |
| - name: Install protoc | |
| uses: arduino/setup-protoc@c65c819552d16ad3c9b72d9dfd5ba5237b9c906b # v3.0.0 | |
| with: | |
| # protoc 3.21.12 — must match the version recorded in the api/gen | |
| # file headers, or regeneration differs with no proto change. | |
| version: "21.12" | |
| repo-token: ${{ secrets.GITHUB_TOKEN }} | |
| # Pinned to the versions recorded in the generated file headers, NOT | |
| # @latest — a new plugin release must not fail this check. | |
| - name: Install proto plugins | |
| run: | | |
| go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.36.11 | |
| go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.6.2 | |
| - name: Regenerate | |
| run: make proto | |
| - name: Check for drift | |
| run: | | |
| git diff --exit-code -- api/gen || { | |
| echo "::error::api/gen is stale — run 'make proto' (with the pinned plugin versions above) and commit the result" | |
| exit 1 | |
| } |