update default null chainId value #491
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: Run golangci-lint | |
on: [pull_request] | |
jobs: | |
detect-modules: | |
runs-on: ubuntu-latest | |
outputs: | |
modules: ${{ steps.set-modules.outputs.modules }} | |
steps: | |
- uses: actions/checkout@v4 | |
- id: set-modules | |
run: echo modules=$(echo "$(dirname $(find * -name 'go.mod'))" | jq -cnR '[inputs | select(length>0)]') >> $GITHUB_OUTPUT | |
golangci-lint: | |
needs: detect-modules | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
contents: read | |
actions: read | |
strategy: | |
fail-fast: false | |
matrix: | |
module: ${{ fromJson(needs.detect-modules.outputs.modules) }} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 | |
with: | |
cache-dependency-path: ${{ matrix.module }}/go.sum | |
go-version-file: ${{ matrix.module }}/go.mod | |
- name: Run golangci-lint for ${{ matrix.module }} | |
uses: golangci/golangci-lint-action@4696ba8babb6127d732c3c6dde519db15edab9ea # v6.5.1 | |
with: | |
args: --config=${{ github.workspace }}/.golangci.yml | |
only-new-issues: true | |
version: v1.64.2 | |
working-directory: ${{ matrix.module }} | |
# Per https://github.com/orgs/community/discussions/4324, we need to capture a matrix-job result | |
# to use it for branch protection. | |
golangci-lint-result: | |
needs: golangci-lint | |
runs-on: ubuntu-latest | |
if: ${{ always() && needs.golangci-lint.result != 'skipped'}} | |
steps: | |
- if: ${{ needs.golangci-lint.result != 'success' }} | |
run: exit 1 |