-
Notifications
You must be signed in to change notification settings - Fork 105
42 lines (38 loc) · 1.85 KB
/
build-others-native.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: Build and Publish Native Docker Images for Other Microservices
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build-others-native:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 17
- name: Build native order microservice with Maven
run: cd microservice-istio-demo/microservice-istio-order && mvn -B spring-boot:build-image -Pnative
- name: Build native invoicing microservice with Maven
run: cd microservice-istio-demo/microservice-istio-invoicing && mvn -B spring-boot:build-image -Pnative
- name: Build native shipping microservice with Maven
run: cd microservice-istio-demo/microservice-istio-shipping && mvn -B spring-boot:build-image -Pnative
- name: Log into registry
run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin
- name: Push image for native microservice order
run: |
IMAGE_PREFIX=${{ secrets.DOCKER_USERNAME }}
docker tag microservice-istio-order:0.0.1-SNAPSHOT $IMAGE_PREFIX/microservice-istio-order-native:1
docker push $IMAGE_PREFIX/microservice-istio-order-native:1
- name: Push image for native microservice invoicing
run: |
IMAGE_PREFIX=${{ secrets.DOCKER_USERNAME }}
docker tag microservice-istio-invoicing:0.0.1-SNAPSHOT $IMAGE_PREFIX/microservice-istio-invoicing-native:1
docker push $IMAGE_PREFIX/microservice-istio-invoicing-native:1
- name: Push image for native microservice shipping
run: |
IMAGE_PREFIX=${{ secrets.DOCKER_USERNAME }}
docker tag microservice-istio-shipping:0.0.1-SNAPSHOT $IMAGE_PREFIX/microservice-istio-shipping-native:1
docker push $IMAGE_PREFIX/microservice-istio-shipping-native:1