-
Notifications
You must be signed in to change notification settings - Fork 1
42 lines (37 loc) · 1.17 KB
/
maven.yml
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
name: Java CI with Maven
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 17
uses: actions/setup-java@v2
with:
java-version: '17'
distribution: 'adopt'
cache: maven
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: '18.x'
- name: Setup angular
run: npm install -g @angular/cli > /dev/null
- name: Build with Maven
run: mvn -B install --file pom.xml
# - name: Login to Docker Hub
# uses: docker/login-action@v1
# with:
# username: ${{ secrets.DOCKERHUB_USERNAME }}
# password: ${{ secrets.DOCKERHUB_TOKEN }}
# - name: Set up Docker Buildx
# id: buildx
# uses: docker/setup-buildx-action@v1
# - name: Build Docker Image
# run: mvn -B spring-boot:build-image -DskipTest=true -Dspring-boot.build-image.imageName=${{ secrets.DOCKERHUB_USERNAME }}/spring-angular-starter --file backend/pom.xml
# - name: Docker Image Push
# run: docker push ${{ secrets.DOCKERHUB_USERNAME }}/spring-angular-starter:latest