Skip to content

Commit ae69f8e

Browse files
committed
Add or update the App Service deployment workflow configuration from Azure Portal.
1 parent 946a7fc commit ae69f8e

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed

Diff for: .github/workflows/main_githubreposecretsapp.yml

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy
2+
# More GitHub Actions for Azure: https://github.com/Azure/actions
3+
4+
name: Build and deploy container app to Azure Web App - githubreposecretsapp
5+
6+
on:
7+
push:
8+
branches:
9+
- main
10+
workflow_dispatch:
11+
12+
jobs:
13+
build:
14+
runs-on: 'ubuntu-latest'
15+
16+
steps:
17+
- uses: actions/checkout@v2
18+
19+
- name: Set up Docker Buildx
20+
uses: docker/setup-buildx-action@v2
21+
22+
- name: Log in to registry
23+
uses: docker/login-action@v2
24+
with:
25+
registry: https://githubreposecrets.azurecr.io/
26+
username: ${{ secrets.AzureAppService_ContainerUsername_3aa392e9684d40e3b398c71b1d26b6e2 }}
27+
password: ${{ secrets.AzureAppService_ContainerPassword_223edf3cf9104425b323d1d0d06d998e }}
28+
29+
- name: Build and push container image to registry
30+
uses: docker/build-push-action@v3
31+
with:
32+
push: true
33+
tags: githubreposecrets.azurecr.io/${{ secrets.AzureAppService_ContainerUsername_3aa392e9684d40e3b398c71b1d26b6e2 }}/githubreposecrets:${{ github.sha }}
34+
file: ./Dockerfile
35+
36+
deploy:
37+
runs-on: ubuntu-latest
38+
needs: build
39+
environment:
40+
name: 'production'
41+
url: ${{ steps.deploy-to-webapp.outputs.webapp-url }}
42+
43+
steps:
44+
- name: Deploy to Azure Web App
45+
id: deploy-to-webapp
46+
uses: azure/webapps-deploy@v2
47+
with:
48+
app-name: 'githubreposecretsapp'
49+
slot-name: 'production'
50+
publish-profile: ${{ secrets.AzureAppService_PublishProfile_9eed1e88bdaa469cbcea66a3101a2894 }}
51+
images: 'githubreposecrets.azurecr.io/${{ secrets.AzureAppService_ContainerUsername_3aa392e9684d40e3b398c71b1d26b6e2 }}/githubreposecrets:${{ github.sha }}'

0 commit comments

Comments
 (0)