Skip to content

Merge branch

Merge branch #7

Workflow file for this run

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