Skip to content

Commit

Permalink
chore(#71): add deploy action
Browse files Browse the repository at this point in the history
  • Loading branch information
njogz authored May 12, 2023
1 parent d1228a5 commit 5dc90c1
Showing 1 changed file with 28 additions and 1 deletion.
29 changes: 28 additions & 1 deletion .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- 'main'

jobs:
docker:
build:
runs-on: ubuntu-latest
steps:
- name: Build timestamp
Expand Down Expand Up @@ -35,3 +35,30 @@ jobs:
file: ./mediator/Dockerfile
push: true
tags: medicmobile/openhim-mediator:${{ env.BUILD_TIMESTAMP }}

deploy:
name: Deploy
if: github.ref == 'refs/heads/main'
needs: [ build ]
runs-on: ubuntu-latest
steps:
- name: Set the Kubernetes context
uses: azure/k8s-set-context@v2
with:
method: service-account
k8s-url: <server-url>
k8s-secret: ${{ secrets.KUBERNETES_SECRET }}

- name: Checkout source code
uses: actions/checkout@v3

- name: Deploy to the Kubernetes cluster
uses: azure/k8s-deploy@v1
with:
namespace: default
manifests: |
kubernetes/deployment.yaml
kubernetes/ingress.yaml
kubernetes/service.yaml
images: |
medicmobile/openhim-mediator:${{ env.BUILD_TIMESTAMP }}

0 comments on commit 5dc90c1

Please sign in to comment.