Skip to content

Commit be91ca9

Browse files
gireesh-naidueshankvaishdevopsdevtonkirandevtn
authored
feat: configure cluster filter in notification settings (#78)
* feat: add cluster filtering for configuring the notifications * test fix * fix: legacy query fix * fix: query fix for all prod/non prod environments * app and env combination case missing in legacy query * app and env combination case missing in legacy query * chore: comments added * chore: bump version for axios, braces and notifme-sdk * added mech for tagging of hotfixes * Update tag-patch-incre.yaml * Update tag-patch-incre.yaml --------- Co-authored-by: Eshank Vaish <[email protected]> Co-authored-by: systemsdt <[email protected]> Co-authored-by: Kiran <[email protected]>
1 parent 8285646 commit be91ca9

File tree

7 files changed

+1735
-211
lines changed

7 files changed

+1735
-211
lines changed
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Increment tag for patch or minor
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
types:
8+
- closed # Trigger only when a PR is closed (merged or not)
9+
10+
jobs:
11+
tag:
12+
if: github.event.pull_request.merged == true
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v3
17+
with:
18+
fetch-depth: 0
19+
20+
- name: Create new tag
21+
env:
22+
TOKEN: ${{ secrets.TAG_CREATION_TOKEN_PUBLIC }}
23+
run: |
24+
echo $TOKEN | gh auth login --with-token
25+
latest_tag=$(git tag --sort=refname | tail -n 1)
26+
echo "Latest tag: $latest_tag"
27+
28+
# Extract major and minor versions
29+
version=$(echo $latest_tag | cut -d. -f1-2)
30+
# Extract patch version
31+
patch=$(echo $latest_tag | cut -d. -f3)
32+
# Extract minor version
33+
minor=$(echo $latest_tag | cut -d. -f2)
34+
major=$(echo $latest_tag | cut -d. -f1)
35+
36+
# Check if the incoming branch starts with 'release-candidate-'
37+
incoming_branch="${{ github.head_ref }}"
38+
if [[ "$incoming_branch" == release-candidate-* ]]; then
39+
# Increment minor version and reset patch
40+
new_minor=$((minor+1))
41+
new_tag="$major.$new_minor.0"
42+
echo "New tag will be (minor increment): $new_tag"
43+
else
44+
# Increment patch version
45+
new_tag="$version.$((patch+1))"
46+
echo "New tag will be (patch increment): $new_tag"
47+
fi
48+
49+
git config --global user.email "[email protected]"
50+
git config --global user.name "systemsdt"
51+
git tag $new_tag
52+
git push origin $new_tag
53+

0 commit comments

Comments
 (0)