-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (33 loc) · 1.38 KB
/
deploy.yml
File metadata and controls
38 lines (33 loc) · 1.38 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
name: Deploy to IBM Cloud Code Engine
on:
push:
branches:
- master
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install IBM cloud CLI and plugins
run: |
curl -fsSL https://clis.cloud.ibm.com/install/linux | sh
ibmcloud plugin install code-engine
ibmcloud login --apikey ${{secrets.IBM_CLOUD_API_KEY}} -r au-syd
- name: Build & Push Docker Image (User Service)
run: |
docker build -t au.icr.io/mycodeengine/user-service:latest ./user-service
docker login -u iamapikey -p ${{secrets.IBM_CLOUD_API_KEY}} au.icr.io
ibmcloud target -g Default
ibmcloud ce project select -n my-devops-platform
docker push au.icr.io/mycodeengine/user-service:latest
- name: Deploy User Service to Code Engine
run: |
ibmcloud ce application update --name user-service --image au.icr.io/mycodeengine/user-service:latest
- name: Build & Push Docker Image (Order Service)
run: |
docker build -t au.icr.io/mycodeengine/order-service:latest ./order-service
docker push au.icr.io/mycodeengine/order-service:latest
- name: Deploy Order Service to Code Engine
run: |
ibmcloud ce application update --name order-service --image au.icr.io/mycodeengine/order-service:latest