Skip to content

Commit 74eb3b0

Browse files
committed
ci: basecommit: test again
1 parent 4cbb825 commit 74eb3b0

File tree

1 file changed

+22
-28
lines changed

1 file changed

+22
-28
lines changed

.github/workflows/last_upstream.yml

Lines changed: 22 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -23,33 +23,27 @@ jobs:
2323
run: |
2424
git remote add $UPSTREAM_REMOTE $UPSTREAM_URL 2>/dev/null || true
2525
26+
- name: Get kernel version
27+
run: |
28+
KVER=$(make -s kernelversion)
29+
echo "Kernel version: $KVER"
30+
31+
echo "KVER=$KVER" >> $GITHUB_ENV
32+
33+
- name: Derive upstream tag
34+
run: |
35+
# Beispiel: 7.0.0-rc1 → v7.0-rc1
36+
BASE_TAG="v${KVER%.*}"
37+
38+
echo "Derived base tag: $BASE_TAG"
39+
echo "BASE_TAG=$BASE_TAG" >> $GITHUB_ENV
40+
git fetch torvalds "$BASE_TAG" --depth=1
41+
BASE=$(git rev-parse FETCH_HEAD)
42+
echo "Base with torvalds/master via tag: $BASE"
43+
echo "BASE=$BASE" >> $GITHUB_ENV
44+
2645
- name: Find upstream merge-base (torvalds/master)
2746
run: |
28-
set -e
29-
30-
DEPTH=$FETCH_STEP
31-
32-
# get Upstream initial flat
33-
git fetch $UPSTREAM_REMOTE $UPSTREAM_BRANCH --depth=$DEPTH
34-
35-
while true; do
36-
BASE=$(git merge-base HEAD FETCH_HEAD || true)
37-
38-
if [ -n "$BASE" ]; then
39-
echo "Found merge-base: $BASE"
40-
echo "BASE=$BASE" >> $GITHUB_ENV
41-
break
42-
fi
43-
44-
if [ $DEPTH -ge $FETCH_MAX ]; then
45-
echo "Fallback to full fetch..."
46-
git fetch $UPSTREAM_REMOTE $UPSTREAM_BRANCH --unshallow
47-
BASE=$(git merge-base HEAD FETCH_HEAD)
48-
echo "BASE=$BASE" >> $GITHUB_ENV
49-
break
50-
fi
51-
52-
echo "No base yet till $DEPTH, deepening by $FETCH_STEP..."
53-
git fetch $UPSTREAM_REMOTE $UPSTREAM_BRANCH --deepen=$FETCH_STEP
54-
DEPTH=$((DEPTH + FETCH_STEP))
55-
done
47+
BASE=$(git merge-base HEAD torvalds/master)
48+
echo "Merge base with torvalds/master: $BASE"
49+
#echo "BASE=$BASE" >> $GITHUB_ENV

0 commit comments

Comments
 (0)