Skip to content

Commit ac70ff7

Browse files
authored
Merge pull request #45 from Rust-for-Linux/dev/sync-fix
Dev/sync fix
2 parents 1c8a0b7 + f952a94 commit ac70ff7

File tree

2 files changed

+30
-1
lines changed

2 files changed

+30
-1
lines changed

.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

to-kernel.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@ head=$(git rev-parse HEAD)
6060
git am \
6161
--signoff \
6262
--directory="rust/pin-init" \
63-
--exclude="rust/pin-init/sync-kernel.sh" \
63+
--exclude="rust/pin-init/to-kernel.sh" \
64+
--exclude="rust/pin-init/from-kernel.sh" \
6465
--exclude="rust/pin-init/LICENSE-APACHE" \
6566
--exclude="rust/pin-init/LICENSE-MIT" \
6667
--exclude="rust/pin-init/CHANGELOG.md" \

0 commit comments

Comments
 (0)