Use a given token even if the PR is from a fork

This commit is contained in:
Leo Feyer 2024-06-06 12:31:19 +02:00
parent ccf7a1fd43
commit f95915c6c4

View file

@ -46,11 +46,11 @@ const isPullRequestFromFork = (): boolean => {
};
const getToken = async (): Promise<string> => {
if (isPullRequestFromFork()) {
let token = core.getInput('token');
if (!token && isPullRequestFromFork()) {
core.info('==> Fork detected, tokenless uploading used');
return Promise.resolve('');
}
let token = core.getInput('token');
let url = core.getInput('url');
const useOIDC = isTrue(core.getInput('use_oidc'));
if (useOIDC) {