From 614db87c1246fd03a569d476b23fed83ca74eea8 Mon Sep 17 00:00:00 2001 From: Salendarsingh Gaud Date: Sun, 27 Sep 2026 20:54:26 +0530 Subject: [PATCH] ci: sync stable tags to kernel-topics The stable tag sync job currently mirrors latest vX.Y.Z tags from git.kernel.org/stable only into qualcomm-linux/kernel. Automerge expects requested base tags to exist in qualcomm-linux/kernel-topics as well, so stable tags need the same mirroring behavior as Torvalds tags. Push each resolved stable tag to qualcomm-linux/kernel-topics after validating that any existing remote tag points at the expected commit, and fail on SHA mismatches instead of overwriting tags. Signed-off-by: Salendarsingh Gaud --- .github/workflows/sync-upstream-tag.yml | 30 ++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/.github/workflows/sync-upstream-tag.yml b/.github/workflows/sync-upstream-tag.yml index 12f2f76..54fd57a 100644 --- a/.github/workflows/sync-upstream-tag.yml +++ b/.github/workflows/sync-upstream-tag.yml @@ -247,7 +247,8 @@ jobs: # STABLE KERNEL TAG SYNC # # Fetches the latest vX.Y.Z release tag for each tracked stable series from - # git.kernel.org/stable and pushes it to qualcomm-linux/kernel. + # git.kernel.org/stable and pushes it to qualcomm-linux/kernel and + # qualcomm-linux/kernel-topics. # # To track a new stable series in the future, simply add its version string # to the matrix list below, e.g.: @@ -341,6 +342,33 @@ jobs: git push origin "refs/tags/$tag:refs/tags/$tag" echo "Pushed $tag to qualcomm-linux/kernel." + - name: Push stable tag to qualcomm-linux/kernel-topics + if: ${{ !inputs.dry_run }} + shell: bash + env: + GH_TOKEN: ${{ secrets.PAT }} + run: | + set -euo pipefail + cd kernel + + tag="${{ steps.tag.outputs.tag }}" + tag_sha="${{ steps.tag.outputs.tag_sha }}" + remote="https://x-access-token:${GH_TOKEN}@github.com/qualcomm-linux/kernel-topics.git" + + if git ls-remote --exit-code --tags "$remote" "refs/tags/$tag" >/dev/null 2>&1; then + remote_sha=$(git ls-remote --tags "$remote" "refs/tags/$tag" | awk '{print $1}') + if [ "$remote_sha" = "$tag_sha" ]; then + echo "Tag $tag already exists on qualcomm-linux/kernel-topics with correct SHA. Nothing to do." + exit 0 + fi + echo "ERROR: tag $tag already exists on qualcomm-linux/kernel-topics with a different SHA." + echo "Remote: $remote_sha Expected: $tag_sha" + exit 1 + fi + + git push "$remote" "refs/tags/$tag:refs/tags/$tag" + echo "Pushed $tag to qualcomm-linux/kernel-topics." + - name: Summary if: always() shell: bash