-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e87da07
commit 9313d41
Showing
5 changed files
with
46 additions
and
6 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,32 @@ | ||
name: Hotfix Branch | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
tag_version: | ||
description: 'Tag version' | ||
required: true | ||
|
||
jobs: | ||
create-branch: | ||
runs-on: ubuntu-latest | ||
if: github.ref == 'refs/heads/main' | ||
steps: | ||
- name: Checkout project | ||
uses: actions/checkout@v4 | ||
with: | ||
token: ${{ secrets.CI_CD_TOKEN }} | ||
|
||
- name: Create hotfix branch | ||
run: | | ||
START_TAG=v${{ github.event.inputs.tag_version }} | ||
echo "Start from tag $START_TAG" | ||
MAJOR_MINOR_DIGIT=$(echo "$START_TAG" | cut -d '.' -f 1-2) | ||
PATCH_DIGIT=$(echo "$START_TAG" | cut -d '.' -f 3) | ||
NEW_PATCH_DIGIT=$((PATCH_DIGIT + 1)) | ||
HOTFIX_VERSION="${MAJOR_MINOR_DIGIT}.${NEW_PATCH_DIGIT}" | ||
HOTFIX_BRANCH_NAME="hotfix/$HOTFIX_VERSION" | ||
echo "Create hotfix branch $HOTFIX_BRANCH_NAME" | ||
git fetch --all | ||
git checkout tags/$START_TAG -b $HOTFIX_BRANCH_NAME | ||
git push origin $HOTFIX_BRANCH_NAME |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Continuous integration | ||
name: Continuous Integration | ||
|
||
on: | ||
push: | ||
|
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