Skip to content

Deploy_ACI

Deploy_ACI #18

Workflow file for this run

on: workflow_dispatch
name: Deploy_ACI
jobs:
build-and-deploy:
runs-on: ubuntu-latest
environment: prod_azure_motomap
steps:
# checkout our repo
- name: 'Checkout GitHub Action'
uses: actions/checkout@master
- name: 'Login via Azure CLI'
uses: azure/[email protected]
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
- uses: azure/[email protected]
with:
login-server: ${{ secrets.REGISTRY_SERVER }}
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- run: |
curl --output splitter.zip https://motomap.azureedge.net/lib/splitter-r653.zip
curl --output mkgmap.zip https://motomap.azureedge.net/lib/mkgmap-r4916.zip
curl --output sea-latest.zip https://motomap.azureedge.net/lib/sea-latest.zip
unzip splitter.zip
unzip mkgmap.zip
mv splitter-r653 splitter
mv mkgmap-r4916 mkgmap
mkdir precomp-sea
mv sea-latest.zip precomp-sea/
docker build . -t ${{ secrets.REGISTRY_SERVER }}/motomap:${{ github.sha }} -t ${{ secrets.REGISTRY_SERVER }}/motomap:latest
az acr repository untag --name ${{ secrets.REGISTRY_SERVER }} --image motomap:latest
docker push --all-tags ${{ secrets.REGISTRY_SERVER }}/motomap
# - name: 'Deploy to Azure Container Instances'
# uses: 'azure/[email protected]'
# with:
# resource-group: ${{ secrets.RESOURCE_GROUP }}
# dns-name-label: url-for-container
# image: ${{ secrets.REGISTRY_SERVER }}/motomap:${{ github.sha }}
# cpu: 1 #Optional
# memory: 1 #Optional
# registry-username: ${{ secrets.REGISTRY_USERNAME }}
# registry-password: ${{ secrets.REGISTRY_PASSWORD }}
# name: motomap-app-container
# location: 'Central US'