-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add rebase actions and add to test workflows
- Loading branch information
1 parent
e4b18f6
commit 351900e
Showing
8 changed files
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: 'Rebase' | ||
description: 'Action for rebasing to the main branch' | ||
|
||
runs: | ||
using: 'composite' | ||
steps: | ||
# Setup identity to avoid errors when git is trying to rebase without identity set | ||
- name: Setup git identity | ||
run: | | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "Rebase Action" | ||
shell: bash | ||
|
||
# Update origin/main branch locally to cover case when repo is not fully cloned | ||
# for example when using `actions/checkout@v4` action with default `fetch-depth` value (1) | ||
# read more: https://github.com/actions/checkout?tab=readme-ov-file#usage | ||
- name: Update origin/main | ||
run: | | ||
git fetch origin main | ||
git checkout origin/main | ||
git checkout -B main | ||
git pull origin main | ||
# go back to the HEAD commit | ||
git switch --detach ${{ github.sha }} | ||
shell: bash | ||
|
||
- name: Rebase to main | ||
run: | | ||
git rebase main | ||
shell: bash | ||
|
||
- name: Print branch log | ||
run: | | ||
git log origin/main~1.. | ||
shell: bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters