Skip to content

Commit

Permalink
Reorder actions in workflow file and add docker logout (#318)
Browse files Browse the repository at this point in the history
Co-authored-by: Akshay Kumar <kumaraksh@DESKTOP-ARQ1NM6.localdomain>
  • Loading branch information
kumaraksh1 and Akshay Kumar authored Apr 6, 2023
1 parent 440eb48 commit 43cec19
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions .github/workflows/pr_check_windows_container_pubprofile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,28 +30,28 @@ jobs:
ref: main
path: 'python_container_App'

- name: Azure authentication
uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_WEBAPP_SPN }}

- name: Logout from Azure Container Registry
run: |
docker logout env.CONTAINER_REGISTRY
- uses: azure/docker-login@v1
- name: Login to Azure Container Registry
uses: azure/docker-login@v1
with:
login-server: ${{ env.CONTAINER_REGISTRY }}
username: ${{ secrets.WEBDEPLOY_TEST_ACR_USERNAME }}
password: ${{ secrets.WEBDEPLOY_TEST_ACR_PASSWORD }}

- run: |
- name: Pull and tag an image and push it to ACR
run: |
pwd
cd python_container_App
docker pull mcr.microsoft.com/azure-app-service/windows/canary:5.0-nanoserver
docker tag mcr.microsoft.com/azure-app-service/windows/canary:5.0-nanoserver ${{ env.CONTAINER_REGISTRY }}/containerwebapp/canaryreplica:latest
docker push ${{ env.CONTAINER_REGISTRY }}/containerwebapp/canaryreplica:latest
- name: Azure authentication
uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_WEBAPP_SPN }}

- name: Set Web App ACR authentication
uses: Azure/appservice-settings@v1
with:
Expand All @@ -74,8 +74,8 @@ jobs:
"slotSetting": false
}
]
- uses: actions/checkout@v2
name: Checkout from PR branch
- name: Checkout from PR branch
uses: actions/checkout@v2
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
path: 'webapps-deploy'
Expand All @@ -86,10 +86,9 @@ jobs:
cd webapps-deploy
npm install
npm run build
- name: 'Deploy to Azure WebApp'
uses: ./webapps-deploy/
with:
app-name: ${{ env.AZURE_WEBAPP_NAME }} # Replace with your app name
publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }}
images: ${{ env.CONTAINER_REGISTRY }}/containerwebapp/canaryreplica:latest
images: ${{ env.CONTAINER_REGISTRY }}/containerwebapp/canaryreplica:latest

0 comments on commit 43cec19

Please sign in to comment.