From 8e0018e2ed45c0d9f5922884ff10fba51450fcf4 Mon Sep 17 00:00:00 2001 From: strtgbb <146047128+strtgbb@users.noreply.github.com> Date: Thu, 4 Jun 2026 11:39:38 -0400 Subject: [PATCH] fix which ci runs for external branches from org members --- .github/workflows/pull_request.yml | 1 - .github/workflows/pull_request_community.yml | 2 +- ci/workflows/pull_request.py | 1 - ci/workflows/pull_request_community.py | 2 +- 4 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 3d3d36019d2c..5d9956a04aa9 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -41,7 +41,6 @@ jobs: config_workflow: runs-on: [self-hosted, altinity-on-demand, altinity-style-checker-aarch64] needs: [] - if: ${{ github.repository == github.event.pull_request.head.repo.full_name || github.event_name == 'workflow_dispatch' }} name: "Config Workflow" outputs: data: ${{ steps.run.outputs.DATA }} diff --git a/.github/workflows/pull_request_community.yml b/.github/workflows/pull_request_community.yml index 4fe711dc48ab..8457f8bd6074 100644 --- a/.github/workflows/pull_request_community.yml +++ b/.github/workflows/pull_request_community.yml @@ -28,7 +28,7 @@ jobs: config_workflow: runs-on: [self-hosted, altinity-on-demand, altinity-style-checker-aarch64] needs: [] - if: ${{ github.repository != github.event.pull_request.head.repo.full_name }} + if: ${{ !contains(fromJson('["MEMBER","COLLABORATOR","OWNER"]'), github.event.pull_request.author_association) }} name: "Config Workflow" outputs: data: ${{ steps.run.outputs.DATA }} diff --git a/ci/workflows/pull_request.py b/ci/workflows/pull_request.py index f142800e331c..de49a37087ec 100644 --- a/ci/workflows/pull_request.py +++ b/ci/workflows/pull_request.py @@ -43,7 +43,6 @@ name="PR", event=Workflow.Event.PULL_REQUEST, base_branches=[BASE_BRANCH, "releases/*", "antalya-*"], - if_condition="github.repository == github.event.pull_request.head.repo.full_name || github.event_name == 'workflow_dispatch'", jobs=[ # JobConfigs.style_check, # NOTE (strtgbb): we don't run style check # JobConfigs.docs_job, # NOTE (strtgbb): we don't build docs diff --git a/ci/workflows/pull_request_community.py b/ci/workflows/pull_request_community.py index 53f07646a665..7a36e3dcf554 100644 --- a/ci/workflows/pull_request_community.py +++ b/ci/workflows/pull_request_community.py @@ -44,7 +44,7 @@ def _normalize_gh_aliases(items): name="Community PR", event=Workflow.Event.PULL_REQUEST, base_branches=[BASE_BRANCH, "releases/*", "antalya-*"], - if_condition="github.repository != github.event.pull_request.head.repo.full_name", + if_condition='!contains(fromJson(\'["MEMBER","COLLABORATOR","OWNER"]\'), github.event.pull_request.author_association)', jobs=[ JobConfigs.fast_test, *[job.set_dependency(STYLE_AND_FAST_TESTS) for job in JobConfigs.build_jobs],