mirror of
https://github.com/peaceiris/actions-gh-pages.git
synced 2025-07-18 08:23:15 +08:00
fix: skip logic
This commit is contained in:
parent
9df954b37b
commit
c97a39a35f
18
src/utils.ts
18
src/utils.ts
@ -73,13 +73,15 @@ 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 || githubToken) {
|
if (isForkRepository && deployKey === '') {
|
||||||
return false;
|
core.warning('Action runs on fork and deploy_key is empty');
|
||||||
}
|
|
||||||
|
|
||||||
if (isForkRepository && (deployKey || personalToken)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isForkRepository && personalToken === '') {
|
||||||
|
core.warning('Action runs on fork and personalToken is empty');
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user