Skip to content

Commit 24d082a

Browse files
committed
.github: use the linux-modules-kpd files to unify a branch
Each linux-foo-kpd tree right now uses its set of code but this is efficient. We'ven striving to allow sharing as much as code as possible. This branch allows any linux-foo-kpd to use this tree as follows: on: push: branches: ['**'] pull_request: branches: ['**'] workflow_dispatch: # Allow manual triggering jobs: kdevops-workflow: uses: linux-kdevops/kdevops-ci/.github/workflows/kdevops.yml@unified-kpd-tests secrets: inherit Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
1 parent d12c1ee commit 24d082a

12 files changed

Lines changed: 367 additions & 592 deletions

File tree

.github/actions/archive/action.yml

Lines changed: 0 additions & 28 deletions
This file was deleted.

.github/actions/cleanup/action.yml

Lines changed: 0 additions & 24 deletions
This file was deleted.

.github/actions/setup/action.yml

Lines changed: 0 additions & 191 deletions
This file was deleted.

.github/actions/test/action.yml

Lines changed: 0 additions & 60 deletions
This file was deleted.

.github/workflows/autorebase.yml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# SPDX-License-Identifier: GPL-2.0
2+
---
3+
name: Autorebase
4+
5+
on:
6+
workflow_dispatch:
7+
schedule:
8+
- cron: '0 14 * * *'
9+
10+
jobs:
11+
rebase:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout repo
16+
uses: actions/checkout@v4
17+
with:
18+
fetch-depth: 1
19+
ssh-key: ${{ secrets.DEPLOY_KEY }}
20+
21+
- name: Configure git
22+
run: |
23+
git config --local user.email "github-actions@github.com"
24+
git config --local user.name "GitHub Actions"
25+
26+
- name: Set up Python
27+
uses: actions/setup-python@v5
28+
with:
29+
python-version: 3.x
30+
31+
- name: Get latest mainline tag
32+
id: mainline
33+
run: |
34+
tag=$(./scripts/korg-releases.py --moniker mainline)
35+
"${{ github.workspace }}/scripts/github_output.sh" mainline_tag "$tag"
36+
37+
- name: Get current kernel version
38+
id: localver
39+
run: |
40+
version=$(make kernelversion)
41+
tag="v${version/.0/}"
42+
"${{ github.workspace }}/scripts/github_output.sh" local_tag "$tag"
43+
44+
- name: Check if tags match
45+
id: check
46+
run: |
47+
set -euxo pipefail
48+
if [ "${{ steps.mainline.outputs.mainline_tag }}" = \
49+
"${{ steps.localver.outputs.local_tag }}" ]; then
50+
echo "Tags are the same. Skipping rebase."
51+
exit 0
52+
fi
53+
echo "Rebase \
54+
${{ steps.localver.outputs.local_tag }} -> \
55+
${{ steps.mainline.outputs.mainline_tag }}"
56+
57+
- name: Unshallow (get full history for rebase)
58+
run: |
59+
git fetch --unshallow
60+
61+
- name: Add torvalds remote
62+
run: |
63+
git remote add torvalds \
64+
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
65+
git fetch torvalds
66+
67+
- name: Rebase master onto new mainline
68+
run: |
69+
set -euxo pipefail
70+
git checkout ${{ github.event.repository.default_branch }}
71+
git rebase --onto ${{ steps.mainline.outputs.mainline_tag }} \
72+
${{ steps.localver.outputs.local_tag }} \
73+
${{ github.event.repository.default_branch }}
74+
75+
- name: Push rebased branch
76+
run: |
77+
git push origin ${{ github.event.repository.default_branch }} --force

0 commit comments

Comments
 (0)