Skip to content

Commit de4af48

Browse files
committed
workflow recommendations
Signed-off-by: Ian May <[email protected]>
1 parent 19b7b66 commit de4af48

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

.github/workflows/rebase-linux-nvidia-6.12.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,17 @@ jobs:
2727
- name: Find latest stable tag for branch
2828
id: latest_tag
2929
run: |
30-
tag=$(git tag -l 'v6.12.*' --sort=-v:refname | head -1)
30+
version=$(echo ${{ github.ref_name }} | sed 's/^linux-nvidia-//')
31+
tag=$(git describe --abbrev=0 --tags upstream/linux-${version}.y)
3132
echo "tag=$tag" >> $GITHUB_OUTPUT
3233
3334
- name: Fetch patch branch
34-
run: git fetch origin linux-nvidia-6.12
35+
run: git fetch origin ${{ github.ref_name }}
3536

3637
- name: Find merge base between patch branch and updated LTS
3738
id: merge_base
3839
run: |
39-
base=$(git merge-base origin/linux-nvidia-6.12 ${{ steps.latest_tag.outputs.tag }})
40+
base=$(git merge-base origin/${{ github.ref_name }} ${{ steps.latest_tag.outputs.tag }})
4041
echo "base=$base" >> $GITHUB_OUTPUT
4142
4243
- name: Create new branch for rebased patches
@@ -54,4 +55,4 @@ jobs:
5455
5556
- name: Push rebased patch branch
5657
run: |
57-
git push origin HEAD:linux-nvidia-6.12-${{ steps.latest_tag.outputs.tag }}
58+
git push --force origin HEAD:${{ github.ref_name }}-${{ steps.latest_tag.outputs.tag }}

0 commit comments

Comments
 (0)