CI: Support ci-skip-livecheck label (#141987)

This adds support for a ci-skip-livecheck label to cask repository CI,
as a way of skipping livecheck audits when a check works locally and
exclusively fails in the CI environment. This is a rare situation and
the label should not be used for any other purpose at this time.

I previously implemented support for this label in homebrew/core (and
test-bot) to handle this situation (with the same restrictions on its
use), so this commit aligns the core/cask repositories in this regard.
The practical effects of the label differ but the fundamental idea
remains the same.

Co-authored-by: Bevan Kay <email@bevankay.me>
This commit is contained in:
Sam Ford 2023-02-25 17:02:48 -05:00 committed by GitHub
parent e37c6da784
commit 7e569590c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View File

@ -26,6 +26,7 @@ jobs:
github.event.label.name == 'ci-retry' ||
github.event.label.name == 'ci-skip-appcast' ||
github.event.label.name == 'ci-skip-install' ||
github.event.label.name == 'ci-skip-livecheck' ||
github.event.label.name == 'ci-syntax-only' ||
!github.event.label.name
)
@ -37,5 +38,5 @@ jobs:
token: ${{ secrets.HOMEBREW_GITHUB_PUBLIC_REPO_TOKEN }}
once-label: ci-requeue
continuous-label: ci-retry
trigger-labels: ci-skip-appcast,ci-skip-install,ci-syntax-only
trigger-labels: ci-skip-appcast,ci-skip-install,ci-skip-livecheck,ci-syntax-only
workflow: ci.yml

View File

@ -125,6 +125,10 @@ module CiMatrix
"--appcast"
end
if labels.include?("ci-skip-livecheck")
audit_exceptions << ["hosting_with_livecheck", "livecheck_version", "livecheck_min_os"]
end
audit_args << "--except" << audit_exceptions.join(",") if audit_exceptions.any?
runners(path).map do |runner|