Update README.md #13
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |