Skip to content

Commit aead7a0

Browse files
committed
Test CI
1 parent 4ae7a58 commit aead7a0

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

.github/workflows/ci.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
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="${{ env.BASE_VERSION }}"
26+
BASE_VERSION="${BASE_VERSION:-1.17.0}"
27+
echo "Base version: $BASE_VERSION"
28+
29+
IFS='.' read -r MAJOR MINOR PATCH <<< "$BASE_VERSION"
30+
31+
if [[ "${GITHUB_REF##*/}" == "stable" ]]; then
32+
((MINOR++))
33+
PATCH=0
34+
VERSION="$MAJOR.$MINOR.$PATCH"
35+
else
36+
((PATCH++))
37+
VERSION="$MAJOR.$MINOR.$PATCH"
38+
fi
39+
40+
echo "New version: $VERSION"
41+
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
42+
43+
- name: Output new version
44+
run: echo "Version is ${{ steps.version.outputs.version }}"

0 commit comments

Comments
 (0)