Skip to content

Commit 5272e18

Browse files
committed
Added the Gitflow workflow that reuses workflow.yml
1 parent 085600b commit 5272e18

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

.github/workflows/Gitflow.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Git Flow CI
2+
3+
on:
4+
push:
5+
branches:
6+
- develop
7+
- main
8+
- 'feature/*'
9+
- 'release/*'
10+
11+
permissions:
12+
contents: write
13+
14+
jobs:
15+
build:
16+
uses: ./.github/workflows/ci-workflow.yml
17+
with:
18+
python-version: '3.12'
19+
secrets:
20+
DB_USER: ${{ secrets.DB_USER }}
21+
DB_PASSWORD: ${{ secrets.DB_PASSWORD }}
22+
DB_NAME: ${{ secrets.DB_NAME }}
23+
24+
release:
25+
name: Create Release Tag
26+
if: startsWith(github.ref, 'refs/heads/release/')
27+
needs: build
28+
runs-on: ubuntu-latest
29+
30+
steps:
31+
- name: Checkout code
32+
uses: actions/checkout@v4
33+
34+
- name: Create release tag
35+
env:
36+
GIT_TAG: "v$(date +'%Y.%m.%d.%H%M')"
37+
run: |
38+
git config user.name "github-actions[bot]"
39+
git config user.email "github-actions[bot]@users.noreply.github.com"
40+
git tag $GIT_TAG
41+
git push origin $GIT_TAG

0 commit comments

Comments
 (0)