Skip to content

Commit

Permalink
chore: Update Azure CLI login credentials in GitHub workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
tsubakimoto committed Jun 30, 2024
1 parent 5447f32 commit 0f252cb
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/node-express-with-zip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:

- name: 'Run Azure webapp deploy action'
id: deploy-to-webapp
uses: azure/webapps-deploy@v2
uses: azure/webapps-deploy@v3
with:
app-name: ${{ vars.AZURE_WEBAPP_NAME }}-express
slot-name: 'Production'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/node-express-without-artifact.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ jobs:

- name: 'Run Azure webapp deploy action'
id: deploy-to-webapp
uses: azure/webapps-deploy@v2
uses: azure/webapps-deploy@v3
with:
app-name: ${{ vars.AZURE_WEBAPP_NAME }}-express
slot-name: 'Production'
package: ${{ env.WORKING_DIRECTORY }}
package: .

- name: Az CLI Logout
run: az logout
27 changes: 12 additions & 15 deletions .github/workflows/node-express.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ on:
workflow_dispatch:

env:
NODE_VERSION: '16.x'
WORKING_DIRECTORY: nodejs/express

permissions:
Expand All @@ -18,18 +17,16 @@ permissions:
jobs:
build-express:
runs-on: ubuntu-latest

defaults:
run:
working-directory: ${{ env.WORKING_DIRECTORY }}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
node-version: '16.x'
cache: 'npm'
cache-dependency-path: ${{ env.WORKING_DIRECTORY }}

Expand All @@ -40,7 +37,7 @@ jobs:
npm run test --if-present
- name: Upload artifact for deployment job
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: node-app
path: ${{ env.WORKING_DIRECTORY }}
Expand All @@ -51,26 +48,26 @@ jobs:
environment:
name: 'Production'
url: ${{ steps.deploy-to-webapp.outputs.webapp-url }}

steps:
- name: Download artifact from build job
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: node-app

- name: Az CLI Login
uses: azure/login@v1
with:
client-id: ${{ vars.AZURE_CLIENT_ID }}
tenant-id: ${{ vars.AZURE_TENANT_ID }}
subscription-id: ${{ vars.AZURE_SUBSCRIPTION_ID }}
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}

- name: 'Deploy to Azure WebApp'
- name: 'Run Azure webapp deploy action'
id: deploy-to-webapp
uses: azure/webapps-deploy@v2
uses: azure/webapps-deploy@v3
with:
app-name: ${{ vars.AZURE_WEBAPP_NAME }}
app-name: ${{ vars.AZURE_WEBAPP_NAME }}-express
slot-name: 'Production'
package: .

- name: Az CLI Logout
run: az logout

0 comments on commit 0f252cb

Please sign in to comment.