-
Notifications
You must be signed in to change notification settings - Fork 2
136 lines (119 loc) · 3.63 KB
/
Copy pathauth-server-build.yml
File metadata and controls
136 lines (119 loc) · 3.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
name: build VAuthenticator Auth Server
on:
push: { }
workflow_dispatch:
inputs:
version:
description: 'make a tag'
required: false
type: string
newversion:
description: 'Next desired version'
required: false
type: string
jobs:
# tag-artifact:
# if: github.event.inputs.version != '' || github.event.inputs.version != ' '
# needs:
# - build-backend
# - ui-backend
#
# runs-on: ubuntu-22.04
# steps:
# - name: checkout
# uses: actions/checkout@v4
#
# - name: make an echo
# run: |
# echo version ${{github.event.inputs.version}}
#
# - name: set the Tag version
# run: |
# git config --global user.email "${{ secrets.GIT_EMAIL }}"
# git config --global user.name "${{ secrets.GIT_USERNAME }}"
#
# mvn versions:set -DnewVersion=${{github.event.inputs.version}}
# git commit -am "[skip-ci] new version release ${{github.event.inputs.version}}"
# git push
#
# - name: Create tag
# uses: ncipollo/release-action@v1
# with:
# bodyFile: changelog/${{github.event.inputs.version}}.md
# tag: ${{github.event.inputs.version}}
#
# - name: set the Next Development version
# run: |
# git config --global user.email "${{ secrets.GIT_EMAIL }}"
# git config --global user.name "${{ secrets.GIT_USERNAME }}"
#
# mvn versions:set -DnewVersion=${{github.event.inputs.newversion}}
# git commit -am "[skip-ci] new version release ${{github.event.inputs.newversion}}"
# git push
build-backend:
runs-on: ubuntu-22.04
services:
postgres:
image: postgres:14-alpine
ports:
- "5432:5432"
env:
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
localstack:
image: localstack/localstack:3.2
ports:
- "4566-4599:4566-4599"
env:
SERVICES: s3,kms,dynamodb,sns
redis:
image: redis
ports:
- "6379:6379"
steps:
- name: checkout
uses: actions/checkout@v4
- name: Set up JDK 25
uses: actions/setup-java@v4
with:
java-version: 25
distribution: 'corretto'
- name: Build
run: |
cd auth-server
mvn install -q
- name: docker push
run: |
cd auth-server
docker login -u ${{ secrets.DOCKER_HUB_USERNAME }} -p ${{ secrets.DOCKER_HUB_PASSWORD }}
if [[ ${GITHUB_REF##*/} == 'main' ]]
then
DOCKER_TAG="latest"
else
DOCKER_TAG="${GITHUB_REF##*/}"
fi
echo "$DOCKER_TAG"
docker build -t mrflick72/vauthenticator-k8s:$DOCKER_TAG -f application.Dockerfile .
docker push mrflick72/vauthenticator-k8s:$DOCKER_TAG
- name: Docker tag
if: github.event.inputs.version != '' || github.event.inputs.version != ' '
run: |
cd auth-server
DOCKER_TAG="${{github.event.inputs.version}}"
docker build -t mrflick72/vauthenticator-k8s:$DOCKER_TAG -f application.Dockerfile .
docker push mrflick72/vauthenticator-k8s:$DOCKER_TAG
ui-backend:
runs-on: ubuntu-22.04
steps:
- name: checkout
uses: actions/checkout@v4
- name: install node
uses: actions/setup-node@v4
with:
node-version: 21
- name: Build frontend artifacts
run: |
cd auth-server
cd src/main/frontend
npm install --legacy-peer-deps
npm run-script production-build