ci: basecommit: test again #5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: mergebase | |
| on: | |
| push: | |
| jobs: | |
| get_merge_base: | |
| runs-on: ubuntu-latest | |
| env: | |
| UPSTREAM_REMOTE: torvalds | |
| UPSTREAM_URL: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git | |
| UPSTREAM_BRANCH: master | |
| FETCH_STEP: 100 | |
| FETCH_MAX: 2000 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 200 | |
| - name: Add upstream remote (torvalds) | |
| run: | | |
| git remote add $UPSTREAM_REMOTE $UPSTREAM_URL 2>/dev/null || true | |
| - name: Get kernel version | |
| run: | | |
| KVER=$(make -s kernelversion) | |
| echo "Kernel version: $KVER" | |
| echo "KVER=$KVER" >> $GITHUB_ENV | |
| - name: Derive upstream tag | |
| run: | | |
| # Beispiel: 7.0.0-rc1 → v7.0-rc1 | |
| BASE_TAG="v${KVER%.*}" | |
| echo "Derived base tag: $BASE_TAG" | |
| echo "BASE_TAG=$BASE_TAG" >> $GITHUB_ENV | |
| git fetch torvalds "$BASE_TAG" --depth=1 | |
| BASE=$(git rev-parse FETCH_HEAD) | |
| echo "Base with torvalds/master via tag: $BASE" | |
| echo "BASE=$BASE" >> $GITHUB_ENV | |
| - name: Find upstream merge-base (torvalds/master) | |
| run: | | |
| BASE=$(git merge-base HEAD torvalds/master) | |
| echo "Merge base with torvalds/master: $BASE" | |
| #echo "BASE=$BASE" >> $GITHUB_ENV |