5454 env :
5555 EVENT_NAME : ${{ github.event_name }}
5656 LABEL_NAME : ${{ github.event.label.name }}
57+ PR_HEAD_REPO : ${{ github.event.pull_request.head.repo.full_name }}
58+ CURRENT_REPO : ${{ github.repository }}
5759 DISPATCH_RUNS : ${{ inputs.runs }}
5860 DISPATCH_TEST_PATH : ${{ inputs.testPath }}
5961 DISPATCH_GENESIS_FILE : ${{ inputs.genesisFile }}
@@ -79,22 +81,26 @@ jobs:
7981 clients="${DISPATCH_CLIENTS:-nethermind}"
8082 filter="${DISPATCH_FILTER:-}"
8183 elif [[ "${EVENT_NAME}" == "pull_request" ]]; then
82- label="${LABEL_NAME:-}"
84+ if [[ "${PR_HEAD_REPO:-}" != "${CURRENT_REPO:-}" ]]; then
85+ should_run="false"
86+ else
87+ label="${LABEL_NAME:-}"
8388
84- # Only accept labels in the format: gasbench[-<comma-separated-filters>]
85- if [[ "${label}" == "gasbench" ]]; then
86- filter=""
87- elif [[ "${label}" == gasbench-* ]]; then
88- suffix="${label#gasbench-}"
89- if [[ -z "${suffix}" ]]; then
89+ # Only accept labels in the format: gasbench[-<comma-separated-filters>]
90+ if [[ "${label}" == "gasbench" ]]; then
9091 filter=""
91- elif [[ "${suffix}" =~ ^[A-Za-z0-9_.-]+(,[A-Za-z0-9_.-]+)*$ ]]; then
92- filter="${suffix}"
92+ elif [[ "${label}" == gasbench-* ]]; then
93+ suffix="${label#gasbench-}"
94+ if [[ -z "${suffix}" ]]; then
95+ filter=""
96+ elif [[ "${suffix}" =~ ^[A-Za-z0-9_.-]+(,[A-Za-z0-9_.-]+)*$ ]]; then
97+ filter="${suffix}"
98+ else
99+ should_run="false"
100+ fi
93101 else
94102 should_run="false"
95103 fi
96- else
97- should_run="false"
98104 fi
99105 fi
100106
0 commit comments