From 6f7726c0dc300824fc4ebaa4bc873029094ace06 Mon Sep 17 00:00:00 2001 From: IFX-Anusha Date: Wed, 23 Sep 2026 11:10:52 +0000 Subject: [PATCH] ci: limit direct pushes to their board family's own boards Direct pushes to edge-main/control-main only need to build/package that family's own feature boards; PRs still validate the full board matrix before merge. package_core.sh now respects a pre-filtered ALL_BOARD_DATA if the caller sets it, falling back to the full board set otherwise. --- .github/workflows/ifx_package_core.yml | 8 +++++++- extra/package_core.sh | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ifx_package_core.yml b/.github/workflows/ifx_package_core.yml index 5113e58fa..2f1b64814 100644 --- a/.github/workflows/ifx_package_core.yml +++ b/.github/workflows/ifx_package_core.yml @@ -90,8 +90,14 @@ jobs: run: | # Set up basic environment for later steps CORE_VER=$(extra/get_core_version.sh) + ALL_BOARD_DATA=$(extra/get_board_details.sh | jq -c 'sort_by(.variant)') + if [[ "${{ github.event_name }}" == "push" ]]; then + # limit direct pushes to this board family's own boards; PRs still + # validate the full board matrix before merge + ALL_BOARD_DATA=$(jq -c 'map(select(.feature_board == true))' <<< "${ALL_BOARD_DATA}") + fi echo "CORE_HASH=$(git describe --always $HEAD_REF)" >> "$GITHUB_ENV" - echo "ALL_BOARD_DATA=$(extra/get_board_details.sh | jq -c 'sort_by(.variant)')" >> "$GITHUB_ENV" + echo "ALL_BOARD_DATA=${ALL_BOARD_DATA}" >> "$GITHUB_ENV" echo "CORE_VER=${CORE_VER}" >> "$GITHUB_ENV" echo "CORE_VER=${CORE_VER}" >> "$GITHUB_OUTPUT" diff --git a/extra/package_core.sh b/extra/package_core.sh index 77b431480..68bade0c7 100755 --- a/extra/package_core.sh +++ b/extra/package_core.sh @@ -32,7 +32,7 @@ log_msg() { # we use variants for include because we filter on file paths # and boards for exclude because we want to remove matching lines in boards.txt -BOARD_DETAILS=$(extra/get_board_details.sh) +BOARD_DETAILS=${ALL_BOARD_DATA:-$(extra/get_board_details.sh)} if [ $ARTIFACT == "zephyr" ] ; then INCLUDED_VARIANTS=$(echo ${BOARD_DETAILS} | jq -cr ".[].variant") EXCLUDED_BOARDS=""