Skip to content

Commit 0684687

Browse files
kumaraksh1Akshay Kumar
andauthored
Reorder actions in workflow file (#317)
* Reorder actions in workflow file * Add lock on acr login * Refactor workflow file * refactor workflow file --------- Co-authored-by: Akshay Kumar <[email protected]>
1 parent a9fc696 commit 0684687

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

.github/workflows/pr_check_windows_container_pubprofile.yml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,23 +35,25 @@ jobs:
3535
with:
3636
creds: ${{ secrets.AZURE_WEBAPP_SPN }}
3737

38-
- uses: azure/docker-login@v1
38+
- name: Logout from Azure Container Registry
39+
run: |
40+
docker logout env.CONTAINER_REGISTRY
41+
42+
- name: Login to Azure Container Registry
43+
uses: azure/docker-login@v1
3944
with:
4045
login-server: ${{ env.CONTAINER_REGISTRY }}
4146
username: ${{ secrets.WEBDEPLOY_TEST_ACR_USERNAME }}
4247
password: ${{ secrets.WEBDEPLOY_TEST_ACR_PASSWORD }}
4348

44-
- run: |
49+
- name: Pull and tag an image and push it to ACR
50+
run: |
4551
pwd
4652
cd python_container_App
4753
docker pull mcr.microsoft.com/azure-app-service/windows/canary:5.0-nanoserver
4854
docker tag mcr.microsoft.com/azure-app-service/windows/canary:5.0-nanoserver ${{ env.CONTAINER_REGISTRY }}/containerwebapp/canaryreplica:latest
4955
docker push ${{ env.CONTAINER_REGISTRY }}/containerwebapp/canaryreplica:latest
5056
51-
- name: Logout from Azure Container Registry
52-
run: |
53-
docker logout env.CONTAINER_REGISTRY
54-
5557
- name: Set Web App ACR authentication
5658
uses: Azure/appservice-settings@v1
5759
with:
@@ -74,8 +76,9 @@ jobs:
7476
"slotSetting": false
7577
}
7678
]
77-
- uses: actions/checkout@v2
78-
name: Checkout from PR branch
79+
80+
- name: Checkout from PR branch
81+
uses: actions/checkout@v2
7982
with:
8083
repository: ${{ github.event.pull_request.head.repo.full_name }}
8184
path: 'webapps-deploy'

0 commit comments

Comments
 (0)