Skip to content

Commit c38e6ca

Browse files
authored
Merge pull request #10414 from night1rider/zephyr/4.x-workflow-fixes
Zephyr 4.x workflow: stabilize CI for renamed forks and slashed branch names
2 parents 50da0c0 + dc3ba1e commit c38e6ca

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

.github/scripts/zephyr-4.x/zephyr-test.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,7 @@ SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
111111
LOG_DIR="${SCRIPT_DIR}/logs"
112112
mkdir -p "${LOG_DIR}"
113113
TIMESTAMP=$(date +%Y%m%d_%H%M%S)
114-
ZVER="${ZEPHYR_VERSION#v}"
115-
LOG_FILE="${LOG_DIR}/${ZVER}_${WOLFSSL_BRANCH}_${BOARD_TARGET//\//-}_${TIMESTAMP}.log"
114+
LOG_FILE="${LOG_DIR}/${BOARD_SLUG}_${TIMESTAMP}.log"
116115

117116
echo "==> wolfSSL repo: ${WOLFSSL_REPO}"
118117
echo "==> wolfSSL branch: ${WOLFSSL_BRANCH}"
@@ -175,6 +174,7 @@ cd ..
175174
176175
# --- 3. Update all modules (including wolfSSL) ---
177176
echo "==> [container] Running west update..."
177+
export GIT_TERMINAL_PROMPT=0
178178
west update -n -o=--depth=1
179179
180180
# --- 3b. Checkout specific commit if requested ---

.github/workflows/zephyr-4.x.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,9 @@ jobs:
4747
id: src
4848
run: |
4949
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
50-
echo "repo=${{ github.event.pull_request.head.repo.clone_url }}" >> "$GITHUB_OUTPUT"
51-
echo "branch=${{ github.event.pull_request.head.ref }}" >> "$GITHUB_OUTPUT"
50+
# Fetch via upstream PR ref so renames, deletes, or visibility changes on the fork do not break us
51+
echo "repo=https://github.com/${{ github.repository }}" >> "$GITHUB_OUTPUT"
52+
echo "branch=refs/pull/${{ github.event.pull_request.number }}/head" >> "$GITHUB_OUTPUT"
5253
else
5354
echo "repo=https://github.com/${{ github.repository }}" >> "$GITHUB_OUTPUT"
5455
echo "branch=${{ github.ref_name }}" >> "$GITHUB_OUTPUT"

0 commit comments

Comments
 (0)