mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-02-18 20:53:43 +01:00
.github: make the rebase step re-usable
This commit is contained in:
parent
8b31a37ec9
commit
20be40df7b
2 changed files with 16 additions and 6 deletions
15
.github/actions/rebase/action.yml
vendored
Normal file
15
.github/actions/rebase/action.yml
vendored
Normal file
|
@ -0,0 +1,15 @@
|
|||
name: "Rebase on to the PR target base branch"
|
||||
description: "A reusable workflow that's used to rebase the PR code on to the target base branch."
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
|
||||
steps:
|
||||
- name: fetch and rebase on ${{ github.base_ref }}
|
||||
shell: bash
|
||||
run: |
|
||||
git remote add upstream https://github.com/${{ github.repository }}
|
||||
git fetch upstream ${{ github.base_ref }}:refs/remotes/upstream/${{ github.base_ref }}
|
||||
export GIT_COMMITTER_EMAIL="lnd-ci@example.com"
|
||||
export GIT_COMMITTER_NAME="LND CI"
|
||||
git rebase upstream/${{ github.base_ref }}
|
7
.github/workflows/main.yml
vendored
7
.github/workflows/main.yml
vendored
|
@ -103,12 +103,7 @@ jobs:
|
|||
go-version: '${{ env.GO_VERSION }}'
|
||||
|
||||
- name: fetch and rebase on ${{ github.base_ref }}
|
||||
run: |
|
||||
git remote add upstream https://github.com/${{ github.repository }}
|
||||
git fetch upstream ${{ github.base_ref }}:refs/remotes/upstream/${{ github.base_ref }}
|
||||
export GIT_COMMITTER_EMAIL="lnd-ci@example.com"
|
||||
export GIT_COMMITTER_NAME="LND CI"
|
||||
git rebase upstream/${{ github.base_ref }}
|
||||
uses: ./.github/actions/rebase
|
||||
|
||||
- name: check commits
|
||||
run: scripts/check-each-commit.sh upstream/${{ github.base_ref }}
|
||||
|
|
Loading…
Add table
Reference in a new issue