Merge pull request #887 from rudransh2003/sparrow-api-change-version #517
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: Development | |
| on: | |
| push: | |
| branches: | |
| - development | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@master | |
| - uses: Azure/docker-login@v1 | |
| with: | |
| login-server: sparrowprod.azurecr.io | |
| username: ${{ secrets.REGISTRY_USERNAME }} | |
| password: ${{ secrets.REGISTRY_PASSWORD }} | |
| - run: | | |
| docker build . -t sparrowprod.azurecr.io/sparrow-api:${{ github.run_number }} --build-arg GITHUB_TOKEN=${{ secrets.SPARROW_GITHUB_TOKEN }} | |
| docker push sparrowprod.azurecr.io/sparrow-api:${{ github.run_number }} | |
| deploy: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@master | |
| - uses: richardrigutins/replace-in-files@v1 | |
| with: | |
| files: "./deploymentManifests/deployment.yml" | |
| search-text: '_BUILD__ID_' | |
| replacement-text: '${{ github.run_number }}' | |
| - uses: azure/setup-kubectl@v2.0 | |
| - uses: Azure/k8s-set-context@v2 | |
| with: | |
| kubeconfig: ${{ secrets.KUBE_CONFIG }} | |
| - uses: Azure/k8s-deploy@v4 | |
| with: | |
| action: deploy | |
| namespace: sparrow-dev | |
| manifests: | | |
| ./deploymentManifests/deployment.yml |