Skip to content

Commit f952a94

Browse files
committed
ci: add apply check
Checks if the `to-kernel.sh` script can cleanly apply the commits next..PR-HEAD to the pin-init-next branch at the Rust-for-Linux/linux repository. Signed-off-by: Benno Lossin <benno.lossin@proton.me>
1 parent 00d3663 commit f952a94

1 file changed

Lines changed: 28 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,3 +167,31 @@ jobs:
167167
ref: ${{github.event.pull_request.head.sha}}
168168
- run: git config user.name "github-runner" && git config user.email "<>"
169169
- run: git rebase --exec 'git log -1 --pretty=format:%B | grep -q "^Signed-off-by:"' --root
170+
apply:
171+
runs-on: ubuntu-latest
172+
steps:
173+
- uses: actions/checkout@v4
174+
with:
175+
repository: Rust-for-Linux/linux
176+
path: "kernel"
177+
ref: pin-init-next
178+
- uses: actions/checkout@v4
179+
with:
180+
path: "pin-init"
181+
fetch-depth: 0
182+
ref: ${{github.event.pull_request.head.sha}}
183+
- run: |
184+
pushd kernel
185+
git config user.name "github-runner" && git config user.email "<>"
186+
popd # kernel
187+
188+
pushd pin-init
189+
git config user.name "github-runner" && git config user.email "<>"
190+
git fetch
191+
if ! yes | bash ./to-kernel.sh ../kernel origin/next; then
192+
if ! git am --3way; then
193+
git am --show-current-patch=diff
194+
false
195+
fi
196+
false
197+
fi

0 commit comments

Comments
 (0)