Merge branch #7
Workflow file for this run
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
name: Merge branch | |
on: | |
workflow_dispatch: | |
inputs: | |
branch: | |
type: string | |
required: true | |
description: Branch to merge | |
jobs: | |
merge-branch: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout main branch | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Configure git user | |
run: | | |
git config user.name "github-actions[bot]" | |
git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
- name: Merge branch and push | |
run: | | |
git merge --squash --allow-unrelated-histories origin/${{github.event.inputs.branch}} | |
git commit -m ${{github.event.inputs.branch}} | |
git push origin/main && git push origin/${{github.event.inputs.branch}} --delete |