1- # Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy
2- # More GitHub Actions for Azure: https://github.com/Azure/actions
3-
4- name : Build and deploy to Azure App Services
1+ name : setting-default-labels
52
3+ # Controls when the action will run.
64on :
7- push :
8- branches :
9- - user/vchintalapat/github-actions-test
10- schedule :
11- - cron : " 0 0/3 * * *"
5+ schedule :
6+ - cron : " 0 0/3 * * *"
127
8+ # A workflow run is made up of one or more jobs that can run sequentially or in parallel
139jobs :
14- build-and-deploy-dotnet-app :
15- runs-on : ubuntu-latest
16-
17- permissions :
18- id-token : write
19-
20- steps :
21- - uses : actions/checkout@v4
22-
23- - name : Modify the sample app
24- run : |
25- cp -r ./__tests__/dotnetsampleapp dotnetapp
26- current_utc_time=$(date -u +"%Y-%m-%d %H:%M:%S %Z")
27- sed -i "s/<<<net-place-holder>>>/$current_utc_time/g" dotnetapp/Controllers/HelloController.cs
28-
29- echo "The placeholder has been replaced with current UTC time: $current_utc_time"
30-
31- - name : Set up .NET Core
32- uses : actions/setup-dotnet@v4
33- with :
34- dotnet-version : ' 8.x'
35-
36- - name : Build with dotnet
37- run : dotnet build --configuration Release dotnetapp/DOTNET_8_APP.csproj
38-
39- - name : dotnet publish
40- run : dotnet publish dotnetapp/DOTNET_8_APP.csproj -c Release -o myapp
41-
42- - name : Upload artifact for deployment job
43- uses : actions/upload-artifact@v4
44- with :
45- name : .net-app
46- path : myapp
47-
48- - name : Login to Azure
49- uses : azure/login@v2
50- with :
51- client-id : ${{ secrets.AZUREAPPSERVICE_CLIENTID_DOTNETAPP1 }}
52- tenant-id : ${{ secrets.AZUREAPPSERVICE_TENANTID }}
53- subscription-id : ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID }}
54-
55- - name : Deploy to Azure Web App
56- id : deploy-to-webapp
57- uses : azure/webapps-deploy@v3
58- with :
59- app-name : ' lwasv2-euap-dotnet-githubactionstest'
60- slot-name : ' Production'
61- package : myapp
62-
63- build-and-deploy-node-app :
10+ build :
11+ # The type of runner that the job will run on
6412 runs-on : ubuntu-latest
6513
66- permissions :
67- id-token : write
68-
14+ # Steps represent a sequence of tasks that will be executed as part of the job
6915 steps :
70- - uses : actions/checkout@v4
71-
72- - name : modify Node.js App
73- run : |
74- cp -r ./__tests__/nodesampleapp nodeapp
75- current_utc_time=$(date -u +"%Y-%m-%d %H:%M:%S %Z")
76- sed -i "s/<<<node-place-holder>>>/$current_utc_time/g" nodeapp/server.js
77-
78- echo "The placeholder has been replaced with current UTC time: $current_utc_time"
79-
80- - name : Set up Node.js version
81- uses : actions/setup-node@v3
82- with :
83- node-version : ' 18.x'
84-
85- - name : npm install, build, and test
86- run : |
87- cd nodeapp
88- npm install
89- npm run build --if-present
90- npm run test --if-present
91-
92- - name : Upload artifact for deployment job
93- uses : actions/upload-artifact@v4
94- with :
95- name : node-app
96- path : nodeapp
97-
98- - name : Login to Azure
99- uses : azure/login@v2
100- with :
101- client-id : ${{ secrets.AZUREAPPSERVICE_CLIENTID_NODEAPP1 }}
102- tenant-id : ${{ secrets.AZUREAPPSERVICE_TENANTID }}
103- subscription-id : ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID }}
104-
105- - name : ' Deploy to Azure Web App'
106- id : deploy-to-webapp
107- uses : azure/webapps-deploy@v3
108- with :
109- app-name : ' lwasv2-euap-node-githubactions'
110- slot-name : ' Production'
111- package : nodeapp
16+ - uses : actions/stale@v3
17+ name : Setting issue as idle
18+ with :
19+ repo-token : ${{ secrets.GITHUB_TOKEN }}
20+ stale-issue-message : ' This issue is idle because it has been open for 14 days with no activity.'
21+ stale-issue-label : ' idle'
22+ days-before-stale : 14
23+ days-before-close : -1
24+ operations-per-run : 100
25+ exempt-issue-labels : ' backlog'
26+
27+ - uses : actions/stale@v3
28+ name : Setting PR as idle
29+ with :
30+ repo-token : ${{ secrets.GITHUB_TOKEN }}
31+ stale-pr-message : ' This PR is idle because it has been open for 14 days with no activity.'
32+ stale-pr-label : ' idle'
33+ days-before-stale : 14
34+ days-before-close : -1
35+ operations-per-run : 100
0 commit comments