Skip to content

Commit

Permalink
Use an existing token even if the PR is from a fork (#1471)
Browse files Browse the repository at this point in the history
Use a given token even if the PR is from a fork
  • Loading branch information
leofeyer committed Jun 12, 2024
1 parent 81c0a51 commit 7594baa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/buildExec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ 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');
process.env['TOKENLESS'] = context.payload.pull_request.head.label;
return Promise.resolve('');
}
let token = core.getInput('token');
let url = core.getInput('url');
const useOIDC = isTrue(core.getInput('use_oidc'));
if (useOIDC) {
Expand Down

0 comments on commit 7594baa

Please sign in to comment.