Skip to content

Commit

Permalink
Add or update the App Service deployment workflow configuration from …
Browse files Browse the repository at this point in the history
…Azure Portal.
  • Loading branch information
tikazyq committed Jul 13, 2023
1 parent f0996e1 commit 28ccbbc
Showing 1 changed file with 23 additions and 24 deletions.
47 changes: 23 additions & 24 deletions .github/workflows/main_webspot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,32 +7,31 @@ on:
push:
branches:
- main
- develop
workflow_dispatch:

jobs:
build:
runs-on: 'ubuntu-latest'

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Log in to registry
uses: docker/login-action@v1
with:
registry: https://index.docker.io/v1/
username: ${{ secrets.AzureAppService_ContainerUsername_b67dc7551a7640fd84904c3f06b06f4a }}
password: ${{ secrets.AzureAppService_ContainerPassword_579bd25bc5614aa1a0c94ceafb2af043 }}
- name: Log in to registry
uses: docker/login-action@v2
with:
registry: https://index.docker.io/v1/
username: ${{ secrets.AzureAppService_ContainerUsername_1f21dddda19d41168d7da21064c416e7 }}
password: ${{ secrets.AzureAppService_ContainerPassword_571a0b5695234ef287124aa4f453cc46 }}

- name: Build and push container image to registry
uses: docker/build-push-action@v2
with:
push: true
tags: index.docker.io/crawlabteam/webspot:${{ github.sha }}
file: ./Dockerfile
- name: Build and push container image to registry
uses: docker/build-push-action@v3
with:
push: true
tags: index.docker.io/${{ secrets.AzureAppService_ContainerUsername_1f21dddda19d41168d7da21064c416e7 }}/crawlabteam/webspot:${{ github.sha }}
file: ./Dockerfile

deploy:
runs-on: ubuntu-latest
Expand All @@ -42,11 +41,11 @@ jobs:
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: 'webspot'
slot-name: 'production'
publish-profile: ${{ secrets.AzureAppService_PublishProfile_91acb51a4d5d460ea2950d8e6e4f300f }}
images: 'index.docker.io/crawlabteam/webspot:${{ github.sha }}'
- name: Deploy to Azure Web App
id: deploy-to-webapp
uses: azure/webapps-deploy@v2
with:
app-name: 'webspot'
slot-name: 'production'
publish-profile: ${{ secrets.AzureAppService_PublishProfile_7206df3051e540198240685f5b75f017 }}
images: 'index.docker.io/${{ secrets.AzureAppService_ContainerUsername_1f21dddda19d41168d7da21064c416e7 }}/crawlabteam/webspot:${{ github.sha }}'

0 comments on commit 28ccbbc

Please sign in to comment.