diff --git a/GITEA_PATCH.md b/GITEA_PATCH.md new file mode 100644 index 0000000..9f56b93 --- /dev/null +++ b/GITEA_PATCH.md @@ -0,0 +1,13 @@ +# Gitea compatibility patch + +This branch is based on `actions/upload-artifact` v4.6.2 at +`ea165f8d65b6e75b540449e92b4886f43607fa02`. + +Gitea implements the v4 artifact results service, but upstream +`@actions/artifact` classifies every non-GitHub host as unsupported GHES before +contacting that service. The compiled upload and merge entry points therefore +override `isGhes()` to return `false`. + +This is the same narrow compatibility strategy documented by Gitea and used by +`christopherhx/gitea-upload-artifact@v4`. No upload, archive, retention, digest, +or transport logic is changed. diff --git a/dist/merge/index.js b/dist/merge/index.js index eabca8a..6ca43fc 100644 --- a/dist/merge/index.js +++ b/dist/merge/index.js @@ -2898,12 +2898,7 @@ function getResultsServiceUrl() { } exports.getResultsServiceUrl = getResultsServiceUrl; function isGhes() { - const ghUrl = new URL(process.env['GITHUB_SERVER_URL'] || 'https://github.com'); - const hostname = ghUrl.hostname.trimEnd().toUpperCase(); - const isGitHubHost = hostname === 'GITHUB.COM'; - const isGheHost = hostname.endsWith('.GHE.COM'); - const isLocalHost = hostname.endsWith('.LOCALHOST'); - return !isGitHubHost && !isGheHost && !isLocalHost; + return false; } exports.isGhes = isGhes; function getGitHubWorkspaceDir() { @@ -135913,4 +135908,4 @@ module.exports = JSON.parse('[[[0,44],"disallowed_STD3_valid"],[[45,46],"valid"] /******/ module.exports = __webpack_exports__; /******/ /******/ })() -; \ No newline at end of file +; diff --git a/dist/upload/index.js b/dist/upload/index.js index 89238fa..429c7d3 100644 --- a/dist/upload/index.js +++ b/dist/upload/index.js @@ -2898,12 +2898,7 @@ function getResultsServiceUrl() { } exports.getResultsServiceUrl = getResultsServiceUrl; function isGhes() { - const ghUrl = new URL(process.env['GITHUB_SERVER_URL'] || 'https://github.com'); - const hostname = ghUrl.hostname.trimEnd().toUpperCase(); - const isGitHubHost = hostname === 'GITHUB.COM'; - const isGheHost = hostname.endsWith('.GHE.COM'); - const isLocalHost = hostname.endsWith('.LOCALHOST'); - return !isGitHubHost && !isGheHost && !isLocalHost; + return false; } exports.isGhes = isGhes; function getGitHubWorkspaceDir() { @@ -135923,4 +135918,4 @@ module.exports = JSON.parse('[[[0,44],"disallowed_STD3_valid"],[[45,46],"valid"] /******/ module.exports = __webpack_exports__; /******/ /******/ })() -; \ No newline at end of file +;