forked from melpa/melpa
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
48 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,48 @@ | ||
name: Rebase onto upstream | ||
|
||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: '0 8 * * 5' | ||
|
||
jobs: | ||
push: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
base_ref: | ||
- akirak | ||
# - admin | ||
upstream_branch: | ||
- 'master' | ||
|
||
steps: | ||
|
||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
sparse-checkout: '.' | ||
ref: ${{ matrix.base_ref }} | ||
|
||
- name: Switch the branch | ||
run: | | ||
git switch -C tmp akirak | ||
- name: Fetch the upstream | ||
run: | | ||
git remote add upstream https://github.com/melpa/melpa.git | ||
git fetch upstream ${{ matrix.upstream_branch }} | ||
- name: Cherry pick commits | ||
run: | | ||
git config --add user.name 'github-actions[bot]' | ||
git config --add user.email '6270544+github-actions[bot]@users.noreply.github.com' | ||
git rebase -s ort -X theirs upstream/${{ matrix.upstream_branch }} | ||
- name: Push changes | ||
uses: ad-m/github-push-action@master | ||
with: | ||
github_token: ${{ secrets.PAT_PUSH }} | ||
branch: '${{ matrix.base_ref }}-tmp' | ||
force: true |