diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 81b2bb2662..51698c4542 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -13,9 +13,22 @@ on: # yamllint disable-line rule:truthy env: GO_VERSION: "~1.20.5" jobs: + go-filter: + runs-on: "ubuntu-latest" + outputs: + gochange: "${{ steps.code-filter.outputs.gochange }}" + steps: + - uses: "actions/checkout@v3" + - uses: "dorny/paths-filter@v2" + id: "go-filter" + with: + filters: | + gochange: + - "**.go" go-lint: name: "Lint Go" runs-on: "ubuntu-latest" + if: "needs.paths-filter.outputs.gochange == 'true'" steps: - uses: "actions/checkout@v3" - uses: "authzed/actions/setup-go@main" @@ -43,6 +56,7 @@ jobs: codeql: name: "Analyze with CodeQL" runs-on: "ubuntu-latest-8-cores" + if: "needs.paths-filter.outputs.gochange == 'true'" permissions: actions: "read" contents: "read"