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