mirror of
https://github.com/peaceiris/actions-gh-pages.git
synced 2025-07-16 23:43:21 +08:00
fix: skip logic
This commit is contained in:
parent
78a39ce0df
commit
01976c9d9b
13
src/utils.ts
13
src/utils.ts
@ -73,15 +73,18 @@ export async function skipOnFork(
|
|||||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
(context.payload as any).repository.fork === 'true';
|
(context.payload as any).repository.fork === 'true';
|
||||||
|
|
||||||
if (isForkRepository && deployKey === '') {
|
if (isForkRepository) {
|
||||||
core.warning('Action runs on fork and deploy_key is empty');
|
if (githubToken) {
|
||||||
return true;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isForkRepository && personalToken === '') {
|
if (!deployKey && !personalToken) {
|
||||||
core.warning('Action runs on fork and personalToken is empty');
|
core.warning(
|
||||||
|
'Action runs on fork and deploy_key or personal_token is empty'
|
||||||
|
);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user