diff --git a/.github/workflows/go-lint.yaml b/.github/workflows/go-lint.yaml index 6bf8dbe91a6..a55dea7d9bf 100644 --- a/.github/workflows/go-lint.yaml +++ b/.github/workflows/go-lint.yaml @@ -8,6 +8,7 @@ on: - "cli/**" - "infra/blueprint-test/**" - "tflint-ruleset-blueprint/**" + - 'infra/module-swapper/**' permissions: contents: read @@ -25,10 +26,6 @@ jobs: folder: [cli, infra/blueprint-test, tflint-ruleset-blueprint] steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0 - with: - go-version-file: ${{ matrix.folder }}/go.mod - cache-dependency-path: ${{ matrix.folder }}/go.sum - uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 id: changes with: @@ -36,6 +33,11 @@ jobs: src: - ${{ matrix.folder }}/** - ".github/workflows/go-lint.yaml" + - if: steps.changes.outputs.src == 'true' + uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0 + with: + go-version-file: ${{ matrix.folder }}/go.mod + cache-dependency-path: ${{ matrix.folder }}/go.sum - if: steps.changes.outputs.src == 'true' name: golangci-lint uses: golangci/golangci-lint-action@55c2c1448f86e01eaae002a5a3a9624417608d84 # v6.5.2 diff --git a/.github/workflows/go-module-swapper.yml b/.github/workflows/go-module-swapper.yml index ef94208c9b0..47d4b4dcc0d 100644 --- a/.github/workflows/go-module-swapper.yml +++ b/.github/workflows/go-module-swapper.yml @@ -32,20 +32,3 @@ jobs: cache-dependency-path: infra/module-swapper/go.sum - run: |- go test ./... -v - golangci: - name: lint - runs-on: ubuntu-latest - strategy: - fail-fast: false - steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0 - with: - go-version-file: infra/module-swapper/go.mod - cache-dependency-path: infra/module-swapper/go.sum - - name: golangci-lint - uses: golangci/golangci-lint-action@55c2c1448f86e01eaae002a5a3a9624417608d84 # v6.5.2 - with: - version: latest - working-directory: 'infra/module-swapper' - args: --timeout=5m