chore(deps): bump @azure/functions from 4.1.0 to 4.2.0 (#343) #183
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: DEV Build & Deploy | |
on: | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
push: | |
branches: | |
- dev | |
paths-ignore: | |
- "**.md" | |
- "**.png" | |
- ".vscode/**" | |
- ".devcontainer/**" | |
- "assets/**" | |
- ".github/dependabot.yml" | |
- "example.local.settings.json" | |
permissions: | |
contents: read | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
NODE_VERSION: 20.x # set this to the node version to use (supports 18.x, 20.x) | |
DISPLAY_NAME: DEV Azure Alert Endpoint | |
FUNCTION_APP_NAME: ct-common-alert-endpoint | |
FUNCTION_APP_SLOT_NAME: dev | |
FUNCTION_APP_PATH: ./ | |
jobs: | |
build-and-deploy-dev: | |
runs-on: windows-latest | |
environment: development | |
steps: | |
- name: 📤 Notify Teams | |
uses: mikesprague/teams-incoming-webhook-action@v1 | |
with: | |
github-token: ${{ github.token }} | |
webhook-url: ${{ secrets.MS_TEAMS_WEBHOOK_URL_DEV }} | |
deploy-card: true | |
title: ${{ env.DISPLAY_NAME }} Deployment Started | |
color: info | |
- name: 👷 Checkout repo | |
uses: actions/checkout@v4 | |
- name: 🏗️ Setup Node.js ${{ env.NODE_VERSION }} environment | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
- name: ⚡ Cache node_modules | |
uses: actions/cache@v4 | |
id: cache | |
with: | |
path: ${{ env.FUNCTION_APP_PATH }}/node_modules | |
key: ${{ runner.os }}-node-${{ env.NODE_VERSION }}-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node-${{ env.NODE_VERSION }}- | |
- name: ⬆️ Update npm and install dependencies | |
if: steps.cache.outputs.cache-hit != 'true' | |
shell: bash | |
run: npm i -g npm && npm ci --omit=dev | |
- name: 🛫 Deploy function app to Azure | |
uses: Azure/functions-action@v1 | |
with: | |
app-name: ${{ env.FUNCTION_APP_NAME }} | |
package: ${{ env.FUNCTION_APP_PATH }} | |
publish-profile: ${{ secrets.AZURE_FUNCTIONAPP_PUBLISH_PROFILE_DEV }} | |
respect-funcignore: true | |
- name: ⚠️ Cancelled Notification | |
if: ${{ cancelled() }} | |
uses: mikesprague/teams-incoming-webhook-action@v1 | |
with: | |
github-token: ${{ github.token }} | |
webhook-url: ${{ secrets.MS_TEAMS_WEBHOOK_URL_DEV }} | |
deploy-card: true | |
title: ${{ env.DISPLAY_NAME }} Deployment Cancelled | |
color: warning | |
- name: ⛔ Failure Notification | |
if: ${{ failure() }} | |
uses: mikesprague/teams-incoming-webhook-action@v1 | |
with: | |
github-token: ${{ github.token }} | |
webhook-url: ${{ secrets.MS_TEAMS_WEBHOOK_URL_DEV }} | |
deploy-card: true | |
title: ${{ env.DISPLAY_NAME }} Deployment Failed | |
color: failure | |
- name: 🎉 Success Notification | |
if: ${{ success() }} | |
uses: mikesprague/teams-incoming-webhook-action@v1 | |
with: | |
github-token: ${{ github.token }} | |
webhook-url: ${{ secrets.MS_TEAMS_WEBHOOK_URL_DEV }} | |
deploy-card: true | |
title: ${{ env.DISPLAY_NAME }} Deployment Successful | |
color: success |