From d75c5cdf4d8f6a4b7b28d83642b28db21768d059 Mon Sep 17 00:00:00 2001 From: Twisha Bansal Date: Wed, 18 Feb 2026 15:26:58 +0530 Subject: [PATCH] ci: Optimize CI by skipping lin presubmit on non-code changes --- .github/workflows/lint.yaml | 5 ++++ .github/workflows/lint_fallback.yaml | 35 ++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 .github/workflows/lint_fallback.yaml diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index f67dde92971..01845415a24 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -15,6 +15,11 @@ name: lint on: pull_request: + paths-ignore: + - "docs/**" + - "**.md" + - ".github/**" + - "!.github/workflows/lint.yaml" pull_request_target: types: [labeled] diff --git a/.github/workflows/lint_fallback.yaml b/.github/workflows/lint_fallback.yaml new file mode 100644 index 00000000000..0850a510461 --- /dev/null +++ b/.github/workflows/lint_fallback.yaml @@ -0,0 +1,35 @@ +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: lint + +on: + pull_request: + paths: + - "docs/**" + - "**.md" + - ".github/**" + - "!.github/workflows/lint.yaml" + +permissions: read-all + +jobs: + lint: + name: lint + runs-on: ubuntu-latest + steps: + - name: Skip Lint + run: | + echo "Skipping lint for documentation/config-only changes." + echo "This job exists to satisfy the required status check."