-
Notifications
You must be signed in to change notification settings - Fork 25
56 lines (47 loc) · 1.46 KB
/
rebase.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
name: 'Rebase'
on:
workflow_call:
inputs:
base:
type: string
required: false
default: 'main'
target:
type: string
required: false
default: 'develop'
workflow_dispatch:
inputs:
base:
type: string
description: 'Base branch'
default: 'develop'
required: true
target:
type: string
description: 'Target branch to update'
default: 'main'
required: true
repository_dispatch:
types: [ rebase-command ]
concurrency:
group: rebase-${{ github.event.client_payload.target || github.event.inputs.target || inputs.target }}
cancel-in-progress: true
jobs:
rebase:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
persist-credentials: false
token: ${{ secrets.GH_REPO_TOKEN }}
# TODO: Switch to v3 with app credentials when GitHub apps are allowed to bypass status checks. https://github.com/orgs/community/discussions/43460
- uses: myparcelnl/actions/setup-git-credentials@v2
with:
token: ${{ secrets.GH_REPO_TOKEN }}
- uses: myparcelnl/actions/rebase@v3
with:
token: ${{ secrets.GH_REPO_TOKEN }}
target: ${{ github.event.client_payload.target || github.event.inputs.target || inputs.target }}
base: ${{ github.event.client_payload.base || github.event.inputs.base || inputs.base }}