fix: skip outdated action warnings on GitHub Enterprise Server#662
Open
leno23 wants to merge 1 commit into
Open
fix: skip outdated action warnings on GitHub Enterprise Server#662leno23 wants to merge 1 commit into
leno23 wants to merge 1 commit into
Conversation
Outdated popular action warnings assume github.com or GHEC where newer action versions exist. GHES appliances without GitHub Connect may only ship actions/upload-artifact@v3 and cannot use v3-node20 or v4 (rhysd#509). Honor GITHUB_SERVER_URL: keep checks on github.com and *.ghe.com, skip on other hosts. Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #509.
On GitHub Enterprise Server without GitHub Connect,
actions/upload-artifact@v3andactions/download-artifact@v3may remain the only available versions whilev3-node20andv4refs are not shipped. actionlint v1.7.4+ flags v3 as outdated and suggests upgrades that are not possible on those appliances.This change skips the outdated popular action check when
GITHUB_SERVER_URLis set to a host other thangithub.comor*.ghe.com(GitHub Enterprise Cloud). Checks continue to run on github.com, GHEC, and when the variable is unset (local lint default).Test plan
go test ./...TestIsGitHubHostedPlatformfor URL casesTestOutdatedActionsSkippedOnGHES/TestOutdatedActionsReportedOnGitHubComtestdata/ok/ghes/artifact-v3.yamlpasses with a GHES-styleGITHUB_SERVER_URL