forked from bUnit-dev/bUnit
-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (50 loc) · 1.63 KB
/
rebase-v2-on-main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: rebase-v2-on-main
on:
push:
branches:
- main
workflow_dispatch:
env:
TERM: xterm
jobs:
rebase:
name: 🎁 Rebase V2 on Main
runs-on: ubuntu-latest
steps:
- name: 🛒 Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.BUNIT_BOT_TOKEN }}
- name: ⚙️ Import GPG key
id: import_gpg
uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ secrets.BUNIT_BOT_GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.BUNIT_BOT_GPG_KEY_PASSPHRASE }}
- name: ⚙️ Setup CI GIT
run: |
git config user.name "${{ steps.import_gpg.outputs.name }}"
git config user.email ${{ steps.import_gpg.outputs.email }}
git config --global user.signingkey ${{ steps.import_gpg.outputs.keyid }}
git config --global commit.gpgsign true
- name: ⏩ Rebase v2 on main, push to origin
id: rebaseV2
continue-on-error: true
run: |
git fetch --all
git checkout v2
git rebase -S main
git push --force-with-lease
- name: ⏭ Create pull request
if: steps.rebaseV2.outcome == 'failure'
uses: thomaseizinger/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.BUNIT_BOT_TOKEN }}
with:
head: main
base: v2
title: Rebase v2 on main
body: |
This PR is created automatically by the bUnit bot.
When completing this PR, it's important to use **Rebase and merge** to keep the commit history clean.