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=""