Skip to content

Commit 04368d9

Browse files
committed
Adds a prefix to help identify tags for each app
1 parent 4e35c2c commit 04368d9

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

.github/workflows/tag_release.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ on:
44
branches:
55
- prod-hccm
66
- prod-ros
7+
- test
8+
- main
79
env:
810
BRANCH: ${{ github.base_ref }}
911

@@ -17,24 +19,29 @@ jobs:
1719
- run: |
1820
git fetch --prune --unshallow
1921
- name: Tag this release
22+
with:
23+
BRANCH: ${{ env.BRANCH }}
2024
env:
2125
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
26+
BRANCH: ${{ env.BRANCH }}
2227
run: |
2328
DATE=$(date +"%Y.%m.%d")
2429
PREV_RELEASE=$(git tag --list | tail -1)
2530
MINOR_VERSION=0
2631
case $PREV_RELEASE in
2732
*"$DATE"*)
28-
MINOR_VERSION="$PREV_RELEASE" | cut -d'.' -f5
33+
MINOR_VERSION=$("$PREV_RELEASE" | cut -d'.' -f5)
2934
MINOR_VERSION=$((MINOR_VERSION+1))
3035
;;
3136
*)
3237
MINOR_VERSION=0
3338
;;
3439
esac
35-
TAG="r.$DATE.$MINOR_VERSION"
40+
APP_PREFIX=$("${{ env.BRANCH }}" | cut -d'-' -f2)
41+
TAG="r-$APP_PREFIX.$DATE.$MINOR_VERSION"
3642
git config --local user.email "[email protected]"
3743
git config --local user.name "Cost Management Release Action"
3844
git log $(git tag --list | tail -1)..${{ env.BRANCH }} | git tag -a $TAG -F -
3945
git push origin $TAG
46+
env
4047
shell: bash

0 commit comments

Comments
 (0)