Merge pull request #1328 from datanav/IS-18631 #721
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: Push latest after PR merge | |
| on: | |
| push: | |
| branches: | |
| - master | |
| jobs: | |
| build: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v2 | |
| - name: Setup python | |
| uses: actions/setup-python@v2 | |
| with: | |
| python-version: 3.9 | |
| - name: Update apt | |
| run: sudo apt-get update | |
| - name: Install tools for generating contracts | |
| run: sudo apt-get -y install texlive-latex-base texlive-latex-extra texlive-plain-generic lmodern texlive-fonts-recommended ghostscript | |
| - name: Install pandoc | |
| run: wget https://github.com/jgm/pandoc/releases/download/2.13/pandoc-2.13-1-amd64.deb && sudo dpkg -i pandoc-2.13-1-amd64.deb | |
| - name: Install pip requirements | |
| run: pip install -r requirements.txt | |
| - name: Docker Login | |
| uses: docker/login-action@v1.10.0 | |
| with: | |
| username: sesamci | |
| password: ${{ secrets.DOCKER_PASSWORD }} | |
| - name: Build | |
| env: | |
| DOCKER_BUILD_PUSH: 1 | |
| VIRTUAL_ENV: venv | |
| run: | | |
| export TAG=${TAG-latest} | |
| export IMAGE_NAME=sesam/docs | |
| export IMAGE_NAME_ACR=sesam.azurecr.io/$IMAGE_NAME | |
| make html | |
| make docker | |
| docker tag $IMAGE_NAME:$TAG $IMAGE_NAME_ACR:$TAG | |
| docker tag $IMAGE_NAME:$TAG $IMAGE_NAME_ACR:${{github.sha}} | |
| - name: ACR login | |
| uses: azure/docker-login@v1 | |
| with: | |
| login-server: sesam.azurecr.io | |
| username: docs-push | |
| password: ${{ secrets.ACR_PASSWORD }} | |
| - name: Push ACR image | |
| run: | | |
| export TAG=${TAG-latest} | |
| export IMAGE_NAME=sesam/docs | |
| export IMAGE_NAME_ACR=sesam.azurecr.io/$IMAGE_NAME | |
| echo "Pushing $IMAGE_NAME_ACR:$TAG" | |
| docker push $IMAGE_NAME_ACR:$TAG | |
| echo "Pushing $IMAGE_NAME_ACR:${{github.sha}}" | |
| docker push $IMAGE_NAME_ACR:${{github.sha}} | |
| - name: Log in to Azure | |
| uses: azure/login@v1 | |
| with: | |
| creds: ${{ secrets.AZURE_CREDENTIALS }} | |
| - name: Build and deploy Container App | |
| uses: azure/container-apps-deploy-action@v1 | |
| with: | |
| acrName: sesam | |
| containerAppName: docs | |
| resourceGroup: sesam-container-apps | |
| imageToDeploy: sesam.azurecr.io/sesam/docs:${{github.sha}} |