-
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.
Merge pull request #840 from mrapp-ke/manage-release-branches
Manage release branches via CI
- Loading branch information
Showing
9 changed files
with
232 additions
and
28 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,41 @@ | ||
name: Merge bugfix into feature branch | ||
on: | ||
push: | ||
branches: | ||
- 'bugfix' | ||
jobs: | ||
merge_bugfix: | ||
name: Merge bugfix into feature branch | ||
runs-on: ubuntu-latest | ||
if: "!contains(github.event.head_commit.message, '[Bot]')" | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: feature | ||
- name: Reset bugfix branch | ||
run: | | ||
export FEATURE_VERSION="$(cat VERSION)" | ||
git fetch origin bugfix:bugfix | ||
git reset --hard bugfix | ||
echo $FEATURE_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 bugfix into feature branch." | ||
branch: merge-bugfix | ||
title: "Merge bugfix into feature branch" | ||
labels: bot | ||
body: "Merge branch \"bugfix\" into \"feature\"." | ||
- 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 }}" |
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,41 @@ | ||
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 $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 }}" |
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
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
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
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
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
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
Oops, something went wrong.