Skip to content

Commit 984a4a0

Browse files
committed
including CD pipeline declaration on GithubActions
1 parent b8be91c commit 984a4a0

File tree

3 files changed

+28
-2
lines changed

3 files changed

+28
-2
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: CD process to deploy to AzureFuncions
2+
3+
on:
4+
# Trigger the workflow on pull request but only for the master branch
5+
pull_request:
6+
types: [closed]
7+
branches:
8+
- master
9+
10+
jobs:
11+
build-and-deploy:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@master
15+
- uses: actions/setup-node@v1
16+
with:
17+
node-version: '10.x'
18+
- name: 'run npm'
19+
run: |
20+
curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
21+
cd AutomaticClockOuts
22+
npm i -g azure-functions-core-tools@core --unsafe-perm true
23+
az login -u ${{ secrets.AZ_USERNAME }} -p ${{ secrets.AZ_PASSWORD }}
24+
npm install
25+
func settings add FUNCTIONS_WORKER_RUNTIME node
26+
func azure functionapp publish time-tracker-azure-functions --node

AutomaticClockOuts/clock_out.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ const doClockOut = async (context) => {
3232
if(totalClockOutsExecuted > 0){
3333
axios.post(slackWebHook,
3434
{
35-
"text": `Hey guys, I did a clock out for you. \nVisit https://timetracker.ioet.com/ and set the right end time for your entries :pls: \n- ${usersWithClockOut.join('\n- ')}`
35+
"text": `Hey guys, I just did a clock out for you. \nPlease visit https://timetracker.ioet.com/ and set the right end time for your entries :pls: \n- ${usersWithClockOut.join('\n- ')}`
3636
}
3737
)
3838
.then(function (response) {

AutomaticClockOuts/readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ func azure functionapp publish time-tracker-azure-functions
2929
```
3030

3131
NOTE:
32-
Don't forget to set the following environment variables to make this app work:
32+
Don't forget to set the following environment variables to make this app work locally:
3333

3434
```sh
3535
ENDPOINT='XXX'

0 commit comments

Comments
 (0)