-
-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (41 loc) · 1.38 KB
/
rebase-development.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
name: Rebase Development
on:
workflow_dispatch:
permissions:
contents: write
jobs:
update:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Get Token
id: get_workflow_token
uses: peter-murray/workflow-application-token-action@v4
with:
application_id: ${{ vars.FUELVIEWS_BOT_APP_ID }}
application_private_key: ${{ secrets.FUELVIEWS_BOT_APP_PRIVATE_KEY }}
- name: Checkout code
uses: actions/checkout@v4
with:
ref: 'main'
fetch-depth: '0'
token: ${{ steps.get_workflow_token.outputs.token }}
- name: Configure Git for auto-rebase and conflict resolution
run: |
git config pull.rebase true
git config user.name "fuelviews-app[bot]"
git config user.email "fuelviews-app[bot]@users.noreply.github.com"
- name: Checkout development branch
run: |
git fetch origin development
git checkout development
- name: Rebase development from main using "ours" strategy
run: |
git rebase -X ours main
env:
GITHUB_TOKEN: ${{ steps.get_workflow_token.outputs.token }}
- name: Push updated development branch
run: |
git push origin development --force-with-lease
env:
GITHUB_TOKEN: ${{ steps.get_workflow_token.outputs.token }}