Patch upload-artifact v4.6.2 for Gitea
Some checks failed
Code scanning - action / CodeQL-Build (push) Has been cancelled
Some checks failed
Code scanning - action / CodeQL-Build (push) Has been cancelled
This commit is contained in:
13
GITEA_PATCH.md
Normal file
13
GITEA_PATCH.md
Normal file
@@ -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.
|
||||
7
dist/merge/index.js
vendored
7
dist/merge/index.js
vendored
@@ -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() {
|
||||
|
||||
7
dist/upload/index.js
vendored
7
dist/upload/index.js
vendored
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user