chore: add push event detection to workflow trust evaluation
This commit is contained in:
7
.github/workflows/codecov-upload.yml
vendored
7
.github/workflows/codecov-upload.yml
vendored
@@ -72,6 +72,11 @@ jobs:
|
||||
is_workflow_dispatch=true
|
||||
fi
|
||||
|
||||
is_push_event=false
|
||||
if [[ "$EVENT_NAME" == "push" ]]; then
|
||||
is_push_event=true
|
||||
fi
|
||||
|
||||
is_dependabot_pr=false
|
||||
if [[ "$EVENT_NAME" == "pull_request" && "$ACTOR" == "dependabot[bot]" ]]; then
|
||||
is_dependabot_pr=true
|
||||
@@ -88,7 +93,7 @@ jobs:
|
||||
fi
|
||||
|
||||
is_trusted=false
|
||||
if [[ "$is_untrusted" == "false" && ( "$is_same_repo_pr" == "true" || "$is_workflow_dispatch" == "true" ) ]]; then
|
||||
if [[ "$is_untrusted" == "false" && ( "$is_same_repo_pr" == "true" || "$is_workflow_dispatch" == "true" || "$is_push_event" == "true" ) ]]; then
|
||||
is_trusted=true
|
||||
fi
|
||||
|
||||
|
||||
7
.github/workflows/quality-checks.yml
vendored
7
.github/workflows/quality-checks.yml
vendored
@@ -62,6 +62,11 @@ jobs:
|
||||
is_workflow_dispatch=true
|
||||
fi
|
||||
|
||||
is_push_event=false
|
||||
if [[ "$EVENT_NAME" == "push" ]]; then
|
||||
is_push_event=true
|
||||
fi
|
||||
|
||||
is_dependabot_pr=false
|
||||
if [[ "$EVENT_NAME" == "pull_request" && "$ACTOR" == "dependabot[bot]" ]]; then
|
||||
is_dependabot_pr=true
|
||||
@@ -78,7 +83,7 @@ jobs:
|
||||
fi
|
||||
|
||||
is_trusted=false
|
||||
if [[ "$is_untrusted" == "false" && ( "$is_same_repo_pr" == "true" || "$is_workflow_dispatch" == "true" ) ]]; then
|
||||
if [[ "$is_untrusted" == "false" && ( "$is_same_repo_pr" == "true" || "$is_workflow_dispatch" == "true" || "$is_push_event" == "true" ) ]]; then
|
||||
is_trusted=true
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user