Skip to content

Merge pull request #61 from arup-group/jenessaman-patch-1 #37

Merge pull request #61 from arup-group/jenessaman-patch-1

Merge pull request #61 from arup-group/jenessaman-patch-1 #37

# Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy
# More GitHub Actions for Azure: https://github.com/Azure/actions
name: Build and deploy container app to Azure Web App - speckle-v2-webhook-prod-web
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build:
runs-on: 'ubuntu-latest'
steps:
- uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Log in to registry
uses: docker/login-action@v1
with:
registry: https://arupspecklev2prodacr.azurecr.io/
username: ${{ secrets.AzureAppService_ContainerUsername_592a6616f6cc45a5a547a318c5808ddf }}
password: ${{ secrets.AzureAppService_ContainerPassword_1a4296e21ed54d00ad50079f39c4ae7c }}
- name: Build and push container image to registry
uses: docker/build-push-action@v2
with:
push: true
tags: arupspecklev2prodacr.azurecr.io/${{ secrets.AzureAppService_ContainerUsername_592a6616f6cc45a5a547a318c5808ddf }}/arupspecklev2prodacr/webhook-service:${{ github.sha }}
file: ./packages/webhook-service/Dockerfile
deploy:
runs-on: ubuntu-latest
needs: build
environment:
name: 'p500-webhook-service'
url: ${{ steps.deploy-to-webapp.outputs.webapp-url }}
steps:
- name: Deploy to Azure Web App
id: deploy-to-webapp
uses: azure/webapps-deploy@v2
with:
app-name: 'speckle-v2-webhook-prod-web'
slot-name: 'production'
publish-profile: ${{ secrets.AzureAppService_PublishProfile_54dd1b5256ec4f1d92dbbba7abe745ec }}
images: 'arupspecklev2prodacr.azurecr.io/${{ secrets.AzureAppService_ContainerUsername_592a6616f6cc45a5a547a318c5808ddf }}/arupspecklev2prodacr/webhook-service:${{ github.sha }}'