-
Notifications
You must be signed in to change notification settings - Fork 6
33 lines (24 loc) · 918 Bytes
/
main.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
name: Build abd deploy
on:
push:
branches: [ master ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Build application with Maven
run: mvn -B package --file pom.xml
- name: Build Docker image with Maven
run: mvn -B k8s:build --file pom.xml
- name: Publish image to DockerHub
run: mvn k8s:push -Djkube.docker.username=${{ secrets.DOCKERHUB_USERNAME }} -Djkube.docker.password=${{ secrets.DOCKERHUB_PASSWORD }}
- name: Build Native application Docker image with Maven
run: mvn -B k8s:build --file pom.xml -Pnative
- name: Publish image to DockerHub
run: mvn k8s:push -Pnative -Djkube.docker.username=${{ secrets.DOCKERHUB_USERNAME }} -Djkube.docker.password=${{ secrets.DOCKERHUB_PASSWORD }}