Skip to content

Commit 450a5f4

Browse files
committed
🌱 sync konveyor with rebase (#4)
Signed-off-by: David Zager <david.j.zager@gmail.com>
1 parent 18510df commit 450a5f4

File tree

1 file changed

+56
-0
lines changed

1 file changed

+56
-0
lines changed
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Sync with konveyor
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
branch:
7+
description: "Branch to sync to"
8+
required: true
9+
default: "main"
10+
# Manual triggering only
11+
12+
jobs:
13+
sync:
14+
name: Rebase onto migtools
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- name: Get GitHub App Token
19+
id: app-token
20+
uses: actions/create-github-app-token@v1
21+
with:
22+
app-id: ${{ secrets.MIGTOOLS_BOT_ID }}
23+
private-key: ${{ secrets.MIGTOOLS_BOT_KEY }}
24+
25+
- name: Checkout code
26+
uses: actions/checkout@v4
27+
with:
28+
# Fetch full history for rebase
29+
fetch-depth: 0
30+
token: ${{ steps.app-token.outputs.token }}
31+
32+
- name: Configure Git
33+
run: |
34+
git config user.name "github-actions[bot]"
35+
git config user.email "github-actions[bot]@users.noreply.github.com"
36+
37+
- name: Add konveyor remote
38+
run: |
39+
git remote add konveyor https://github.com/konveyor/editor-extensions.git
40+
git fetch konveyor ${{ inputs.branch }}
41+
42+
- name: Attempt rebase onto konveyor
43+
run: |
44+
echo "Current branch: $(git branch --show-current)"
45+
echo "Attempting to rebase onto konveyor/${{ inputs.branch }}..."
46+
47+
# This will fail hard if there are conflicts
48+
git rebase konveyor/${{ inputs.branch }}
49+
50+
echo "Rebase successful!"
51+
52+
- name: Push rebased changes
53+
run: |
54+
git push --force-with-lease origin $(git branch --show-current)
55+
env:
56+
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}

0 commit comments

Comments
 (0)