Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
including CD pipeline declaration on GithubActions
  • Loading branch information
enriquezrene committed Nov 25, 2020
commit 71dedd43ab6767cfd0b5d3673c58b25acd65aa00
31 changes: 31 additions & 0 deletions .github/workflows/CD-azure-functions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: CD Azure Functions deployment


on:
# Trigger the workflow on pull request but only for the master branch
pull_request:
types: [closed]
branches:
- master

env:
AZURE_FUNCTIONAPP_NAME: 'time-tracker-azure-functions'
AZURE_FUNCTIONAPP_PACKAGE_PATH: 'AutomaticClockOuts' # set this to the path to your web app project, defaults to the repository root

jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions/setup-node@v1
with:
node-version: '10.x'
- name: 'run npm'
run: |
curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
cd AutomaticClockOuts
npm i -g azure-functions-core-tools@core --unsafe-perm true
az login -u ${{ secrets.AZ_USERNAME }} -p ${{ secrets.AZ_PASSWORD }}
npm install
func settings add FUNCTIONS_WORKER_RUNTIME node
func azure functionapp publish time-tracker-azure-functions --node
2 changes: 1 addition & 1 deletion AutomaticClockOuts/clock_out.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const doClockOut = async (context) => {
if(totalClockOutsExecuted > 0){
axios.post(slackWebHook,
{
"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- ')}`
"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- ')}`
}
)
.then(function (response) {
Expand Down
2 changes: 1 addition & 1 deletion AutomaticClockOuts/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func azure functionapp publish time-tracker-azure-functions
```

NOTE:
Don't forget to set the following environment variables to make this app work:
Don't forget to set the following environment variables to make this app work locally:

```sh
ENDPOINT='XXX'
Expand Down