File tree Expand file tree Collapse file tree 1 file changed +15
-12
lines changed Expand file tree Collapse file tree 1 file changed +15
-12
lines changed Original file line number Diff line number Diff line change @@ -12,19 +12,22 @@ export async function run(): Promise<void> {
12
12
const inps : Inputs = getInputs ( ) ;
13
13
showInputs ( inps ) ;
14
14
15
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
16
- const isForkRepository = ( context . payload as any ) . repository . fork ;
17
- const isSkipOnFork = await skipOnFork (
18
- isForkRepository ,
19
- inps . GithubToken ,
20
- inps . DeployKey ,
21
- inps . PersonalToken
22
- ) ;
23
- if ( isSkipOnFork ) {
24
- core . warning (
25
- 'This action runs on a fork and not found auth token, Skip deployment'
15
+ const eventName = context . eventName ;
16
+ if ( eventName === 'pull_request' ) {
17
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
18
+ const isForkRepository = ( context . payload as any ) . repository . fork ;
19
+ const isSkipOnFork = await skipOnFork (
20
+ isForkRepository ,
21
+ inps . GithubToken ,
22
+ inps . DeployKey ,
23
+ inps . PersonalToken
26
24
) ;
27
- return ;
25
+ if ( isSkipOnFork ) {
26
+ core . warning (
27
+ 'This action runs on a fork and not found auth token, Skip deployment'
28
+ ) ;
29
+ return ;
30
+ }
28
31
}
29
32
30
33
const remoteURL = await setTokens ( inps ) ;
You can’t perform that action at this time.
0 commit comments