I have recently created a Node.js Web App in Azure.
(This question relates to the Azure environment specifically and is therefore not a duplicate of this question: Github actions for Rust shows Node.js warning (12 - 16). Additionally, that question does not contain a solution to my question).
I associated a GitHub repo with the application when I was prompted to.
This automatically created a folder structure in my repo like this:
.github > workflows > main_myAppName.yml
I assumed that was the 'workflow' which pushes the code to Azure after a git push.
I changed some files in my local repo, added, committed and pushed to GitHub.
I could see the workflow running in GitHub at this URL:
https://github.com/username/repo_name/actions/runs/0123456789
The page displayed this warning:
build
Node.js 12 actions are deprecated. For more information see: https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/. Please update the following actions to use Node.js 16: actions/checkout@v2, actions/setup-node@v1, actions/upload-artifact@v2
Because I did not create this 'workflow' file, or have any idea how to use it, I don't know how to resolve this warning.
Question:
Should Azure be automatically changing the workflow file so that it is in accordance with GitHub's requirements?
Or will I need to monitor changing requirements for 'workflow' files in the future and learn how to apply the required fixes?
To clarify, I am nervous about changing the 'workflow' file because I am not familiar with it and don't want to mess anything up. I was hoping that Azure would just take care of making the required updates to that file.
Below is a screenshot of the warning messages on the build/deployment/actions page.
(For reference, I am using the Free web app tier in order to test the functionality of Azure. I am assuming this is why the build and deployment took over 30 minutes. I also don't know why I am getting a warning about over 10,000 files in this artifact - there are definitely not 10,000 files in my app, and node_modules is, ofcourse, specified in the .gitignore file).
Edit:
Below is the contents of the workflow file at GitHub named:
https://github.com/username/repo_name/blob/main/.github/workflows/main_myAppNameHere.yml
If it is my responsibility to update this file, can anyone please provide guidance on exactly what needs to be changed in it - the workflow file is a completely new concept for me, so I don't understand it.
# Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy
# More GitHub Actions for Azure: https://github.com/Azure/actions
name: Build and deploy Node.js app to Azure Web App - myAppNameHere
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Node.js version
uses: actions/setup-node@v1
with:
node-version: '18.x'
- name: npm install, build, and test
run: |
npm install
npm run build --if-present
npm run test --if-present
- name: Upload artifact for deployment job
uses: actions/upload-artifact@v2
with:
name: node-app
path: .
deploy:
runs-on: ubuntu-latest
needs: build
environment:
name: 'Production'
url: ${{ steps.deploy-to-webapp.outputs.webapp-url }}
steps:
- name: Download artifact from build job
uses: actions/download-artifact@v2
with:
name: node-app
- name: 'Deploy to Azure Web App'
id: deploy-to-webapp
uses: azure/webapps-deploy@v2
with:
app-name: 'myAppNameHere'
slot-name: 'Production'
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_SOME-LONG-CODE-HERE }}
package: .









