Skip to content

Commit 380e13a

Browse files
authored
Merge pull request #32 from LuisMSuarez/deploy
Deploy container to Azure
2 parents f9fec2d + 1df1071 commit 380e13a

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

.github/workflows/CI-build.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,3 +63,26 @@ jobs:
6363
push: ${{ github.event_name == 'push' }} # always build the container (incl. Pull Requests), but only push to the registry on code push
6464
tags: ${{ env.REGISTRY }}/${{ env.REPO }}:${{ github.sha }}
6565
file: ./Dockerfile
66+
deploy-container:
67+
if: github.event_name == 'push' # Only deploy on push events
68+
runs-on: ubuntu-latest
69+
needs: build
70+
environment:
71+
name: 'Production'
72+
url: ${{ steps.deploy-to-webapp-container.outputs.webapp-url }}
73+
permissions:
74+
id-token: write #This is required for requesting the JWT
75+
contents: read #This is required for actions/checkout
76+
77+
steps:
78+
- name: Lowercase the repo name and username as container tags must be lowercase
79+
run: echo "REPO=${GITHUB_REPOSITORY,,}" >>${GITHUB_ENV}
80+
81+
- name: Deploy to Azure Web App
82+
id: deploy-to-webapp-container
83+
uses: azure/webapps-deploy@v2
84+
with:
85+
app-name: 'botio'
86+
slot-name: 'Production'
87+
publish-profile: ${{ secrets.AZUREAPPSERVICE_CONTAINER_PUBLISH_PROFILE }}
88+
images: '${{ env.REGISTRY }}/${{ env.REPO }}:${{ github.sha }}'

0 commit comments

Comments
 (0)