Skip to content
This repository has been archived by the owner on Apr 8, 2024. It is now read-only.

Commit

Permalink
Add manual rebase workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
atezet authored and Github Action committed Sep 26, 2023
1 parent b6d846a commit 98e9123
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 31 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/rebase.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Rebase and push
on:
workflow_dispatch:

jobs:
update:
runs-on: ubuntu-latest
env:
CI_COMMIT_AUTHOR: Github Action
CI_COMMIT_EMAIL: "github-action@users.noreply.github.com"
steps:
- uses: actions/checkout@v3
with:
fetch-depth: '0'
- run: |
git config user.name "${{ env.CI_COMMIT_AUTHOR }}"
git config user.email "${{ env.CI_COMMIT_EMAIL }}"
- name: Set environment
run: |
echo "CURBRANCH=`git rev-parse --abbrev-ref HEAD`" >> $GITHUB_ENV
echo "NEWBRANCH=`git rev-parse --abbrev-ref HEAD`-`git rev-parse HEAD`" >> $GITHUB_ENV
- name: Preserve branch with current hash
run: |
git checkout -b $NEWBRANCH
git push --set-upstream origin $NEWBRANCH
- name: Rebase main and push with force
run: |
git checkout $CURBRANCH
git remote add upstream https://github.com/verder-helpen/comm-24sessions.git
git pull --rebase upstream main
git push --force-with-lease
31 changes: 0 additions & 31 deletions .github/workflows/update.yaml

This file was deleted.

0 comments on commit 98e9123

Please sign in to comment.