Skip to content

Commit 530b1a4

Browse files
add cd build with build number
1 parent 6d3aa90 commit 530b1a4

1 file changed

Lines changed: 27 additions & 0 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Deploy Workflow
2+
on:
3+
push:
4+
branches:
5+
- main
6+
pull_request:
7+
branches:
8+
- main
9+
jobs:
10+
build-and-deploy:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v4
15+
- name: JDK
16+
uses: actions/setup-java@v4
17+
with:
18+
distribution: 'temurin'
19+
java-version: '21'
20+
- name: Generate Build Number
21+
run: |
22+
BUILD_NUMBER=$(date +'%d%m%Y%H%M%S')
23+
echo "BUILD_NUMBER=$BUILD_NUMBER" >> $GITHUB_ENV
24+
echo "Generated Build Number: $BUILD_NUMBER"
25+
- name: Maven Clean Verify
26+
run: mvn -B -ntp clean verify jib:build \
27+
-Ddocker.image.tag=$BUILD_NUMBER

0 commit comments

Comments
 (0)