Skip to content

Commit 8f25141

Browse files
authored
Update deploy_to_ghcr.yml
1 parent 5366862 commit 8f25141

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed

.github/workflows/deploy_to_ghcr.yml

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build and push Docker image
1+
name: Build, push Docker image and deploy to Azure
22

33
on:
44
push:
@@ -32,4 +32,21 @@ jobs:
3232
docker build --label "org.opencontainers.image.title=copilot-metrics-viewer" --label "org.opencontainers.image.description=Metrics viewer for GitHub Copilot usage" --label "org.opencontainers.image.source=$GITHUB_REPO" -t ghcr.io/$GITHUB_REPO:latest .
3333
docker push ghcr.io/$GITHUB_REPO:latest
3434
env:
35-
GITHUB_REPO: ${{ github.repository }}
35+
GITHUB_REPO: ${{ github.repository }}
36+
37+
deploy:
38+
runs-on: ubuntu-latest
39+
needs: push_to_ghcr
40+
environment:
41+
name: 'production'
42+
url: ${{ steps.deploy-to-webapp.outputs.webapp-url }}
43+
44+
steps:
45+
- name: Deploy to Azure Web App
46+
id: deploy-to-webapp
47+
uses: azure/webapps-deploy@v2
48+
with:
49+
app-name: 'copilot-metrics-viewer'
50+
slot-name: 'production'
51+
publish-profile: ${{ secrets.AzureAppService_PublishProfile_e94dfd38811a421eafe5ce4eee13b68b }}
52+
images: 'ghcr.io//${{ secrets.AzureAppService_ContainerUsername_6e6399ab4c2848209c95dce8fff002f0 }}/github-copilot-resources/copilot-metrics-viewer:${{ github.sha }}'

0 commit comments

Comments
 (0)