Skip to content

Merge pull request #1121 from mrapp-ke/merge-bugfix #117

Merge pull request #1121 from mrapp-ke/merge-bugfix

Merge pull request #1121 from mrapp-ke/merge-bugfix #117

Workflow file for this run

---
name: Merge feature into main branch
on:
push:
branches:
- feature
jobs:
merge_feature:
name: Merge feature into main branch
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[Bot]')"
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: main
- name: Reset feature branch
run: |
export MAIN_VERSION="$(cat .version)"
git fetch origin feature:feature
git reset --hard feature
echo -n "${MAIN_VERSION}" > .version
- name: Generate token
uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ secrets.TOKEN_APP_ID }}
private-key: ${{ secrets.TOKEN_APP_SECRET }}
- name: Submit pull request
id: pull-request
uses: peter-evans/create-pull-request@v6
with:
token: ${{ steps.app-token.outputs.token }}
commit-message: '[Bot] Merge feature into main branch.'
branch: merge-feature
title: Merge feature into main branch
labels: bot
body: Merge branch "feature" into "main".
- name: Enable auto-merge
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
run: gh pr merge --merge --auto "${{ steps.pull-request.outputs.pull-request-number }}"