-
Notifications
You must be signed in to change notification settings - Fork 105
38 lines (34 loc) · 1.57 KB
/
build-others.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
name: Build and Publish Docker Images for Other Microservices
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build-others:
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 other microservices with Maven
run: cd microservice-istio-demo && mvn -B package
- name: Create Docker images for other microservicee
run: cd microservice-istio-demo && sh ./docker-build.sh
- name: Log into registry
run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin
- name: Push image for other microservices
run: |
IMAGE_PREFIX=${{ secrets.DOCKER_USERNAME }}
docker tag microservice-istio-apache $IMAGE_PREFIX/microservice-istio-apache:latest
docker push $IMAGE_PREFIX/microservice-istio-apache:latest
docker tag microservice-istio-postgres $IMAGE_PREFIX/microservice-istio-postgres:latest
docker push $IMAGE_PREFIX/microservice-istio-postgres:latest
docker tag microservice-istio-shipping:1 $IMAGE_PREFIX/microservice-istio-shipping:1
docker push $IMAGE_PREFIX/microservice-istio-shipping:1
docker tag microservice-istio-invoicing:1 $IMAGE_PREFIX/microservice-istio-invoicing:1
docker push $IMAGE_PREFIX/microservice-istio-invoicing:1
docker tag microservice-istio-order:1 $IMAGE_PREFIX/microservice-istio-order:1
docker push $IMAGE_PREFIX/microservice-istio-order:1