name: MIRA-AI-user-service | |
on: | |
push: | |
branches: | |
- development | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@master | |
- uses: Azure/docker-login@v1 | |
with: | |
login-server: miralabs.azurecr.io | |
username: ${{ secrets.REGISTRY_USERNAME }} | |
password: ${{ secrets.REGISTRY_PASSWORD }} | |
- run: | | |
docker build . -t miralabs.azurecr.io/user-api:${{ github.run_number }} | |
docker push miralabs.azurecr.io/user-api:${{ github.run_number }} | |
deploy: | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@master | |
- uses: richardrigutins/replace-in-files@v1 | |
with: | |
files: "./deployment/deployment.yml" | |
search-text: '_BUILD__ID_' | |
replacement-text: '${{ github.run_number }}' | |
- uses: azure/[email protected] | |
- uses: Azure/k8s-set-context@v2 | |
with: | |
kubeconfig: ${{ secrets.KUBE_CONFIG }} | |
- uses: Azure/k8s-deploy@v4 | |
with: | |
action: deploy | |
namespace: 'mira-dev' | |
manifests: | | |
./deployment/deployment.yml |