4848 python-version : ' 3.13'
4949 SHELLOPTS : ${{inputs.debug && 'xtrace'}}
5050 PIP_PROGRESS_BAR : ' off'
51- # Global flag determining whether lint errors are fatal.
52- # TODO(mhucka): uncomment next line & delete 2nd after formatting PRs merged.
53- # soft-linting: ${{inputs.soft-linting}}
54- soft-linting : true
5551
5652concurrency :
5753 cancel-in-progress : true
@@ -83,16 +79,16 @@ jobs:
8379 run : pip install -r requirements.txt -r dev-requirements.txt
8480
8581 - name : Check format
86- continue-on-error : ${{env .soft-linting == 'true'}}
82+ continue-on-error : ${{inputs .soft-linting == 'true'}}
8783 run : |
8884 echo '::add-matcher::.github/problem-matchers/black.json'
8985 check/format-incremental
9086
9187 - name : Check lint
92- continue-on-error : ${{env .soft-linting == 'true'}}
88+ continue-on-error : ${{inputs .soft-linting == 'true'}}
9389 run : |
9490 echo '::add-matcher::.github/problem-matchers/pylint.json'
95- pylint ${{env .soft-linting && '--exit-zero'}} -j 0 .
91+ pylint ${{inputs .soft-linting && '--exit-zero'}} -j 0 .
9692
9793 docker-lint :
9894 name : Dockerfile lint checks
@@ -106,7 +102,7 @@ jobs:
106102 fetch-depth : 0
107103
108104 - name : Run hadolint on Dockerfiles
109- continue-on-error : ${{env .soft-linting == 'true'}}
105+ continue-on-error : ${{inputs .soft-linting == 'true'}}
110106 env :
111107 hadolint_version : ' sha256:e9dbf5113239ef2bf696d20c8f28d3019a47c26a38c98b89344d3e2846c4d5f8'
112108 run : |
@@ -130,7 +126,7 @@ jobs:
130126 run : echo '::add-matcher::.github/problem-matchers/shellcheck.json'
131127
132128 - name : Run ShellCheck
133- continue-on-error : ${{env .soft-linting == 'true'}}
129+ continue-on-error : ${{inputs .soft-linting == 'true'}}
134130 uses : ludeeus/action-shellcheck@00cae500b08a931fb5698e11e79bfbd38e612a38
135131 with :
136132 severity : error
@@ -154,7 +150,7 @@ jobs:
154150 sudo apt-get install --no-install-recommends -y yamllint
155151
156152 - name : Lint the YAML files
157- continue-on-error : ${{env .soft-linting == 'true'}}
153+ continue-on-error : ${{inputs .soft-linting == 'true'}}
158154 run : |
159155 echo "::add-matcher::.github/problem-matchers/yamllint.json"
160156 # shellcheck disable=SC2038
@@ -178,7 +174,7 @@ jobs:
178174 buildifier-version : ' 8.2.1'
179175
180176 - name : Run Buildifier in lint mode
181- continue-on-error : ${{env .soft-linting == 'true'}}
177+ continue-on-error : ${{inputs .soft-linting == 'true'}}
182178 run : |
183179 echo '::add-matcher::.github/problem-matchers/buildifier.json'
184180 # shellcheck disable=SC2038
@@ -196,7 +192,7 @@ jobs:
196192 fetch-depth : 0
197193
198194 - name : Run actionlint
199- continue-on-error : ${{env .soft-linting == 'true'}}
195+ continue-on-error : ${{inputs .soft-linting == 'true'}}
200196 uses : raven-actions/actionlint@3a24062651993d40fed1019b58ac6fbdfbf276cc # v2
201197 with :
202198 flags : ${{inputs.debug && '-verbose'}}
@@ -474,12 +470,8 @@ jobs:
474470 echo "One or more CI jobs failed. Please check the logs for details."
475471 } >> "$GITHUB_STEP_SUMMARY"
476472
477- - name : Report success
478- run : |
479- echo ":white_check_mark: All CI checks passed" >> "$GITHUB_STEP_SUMMARY"
480-
481473 - name : Point out if soft-linting is in effect
482- if : env .soft-linting
474+ if : inputs .soft-linting
483475 run : |
484476 {
485477 echo "> [!CAUTION]:"
0 commit comments