Skip to content

Commit b4a233f

Browse files
committed
Test CI
1 parent 4ae7a58 commit b4a233f

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

.github/workflows/ci.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Finmars CI/CD
2+
3+
on:
4+
push:
5+
branches:
6+
- '*'
7+
tags:
8+
- '*'
9+
pull_request:
10+
11+
12+
jobs:
13+
versioning:
14+
name: Generate Docker Version
15+
runs-on: ubuntu-latest
16+
outputs:
17+
version: ${{ steps.version.outputs.version }}
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v3
21+
22+
- name: Determine new version
23+
id: version
24+
run: |
25+
BASE_VERSION="${BASE_VERSION:-1.17.0}"
26+
echo "Base version: $BASE_VERSION"
27+
28+
IFS='.' read -r MAJOR MINOR PATCH <<< "$BASE_VERSION"
29+
30+
if [[ "${GITHUB_REF##*/}" == "stable" ]]; then
31+
((MINOR++))
32+
PATCH=0
33+
VERSION="$MAJOR.$MINOR.$PATCH"
34+
else
35+
((PATCH++))
36+
VERSION="$MAJOR.$MINOR.$PATCH"
37+
fi
38+
39+
echo "New version: $VERSION"
40+
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
41+
42+
- name: Output new version
43+
run: echo "Version is ${{ steps.version.outputs.version }}"

0 commit comments

Comments
 (0)