Skip to content

Commit

Permalink
Added slack notification to github workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
vpmedia committed Jan 3, 2024
1 parent 49bcb54 commit 2d3fbb8
Showing 1 changed file with 18 additions and 9 deletions.
27 changes: 18 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright (c) 2023-present VPMedia
# author: Andras Csizmadia <[email protected]>

name: Node.js CI
name: Continuous Integration

on:
push:
Expand All @@ -11,21 +11,30 @@ on:

jobs:
build:

runs-on: ubuntu-22.04

strategy:
matrix:
node-version: [20.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm ci
- run: npm run lint
- run: npm test
cache: "npm"
- name: Init
run: npm ci
- name: Lint
run: npm run lint
- name: Test
run: npm run test
- name: Slack notification
# https://github.com/slackapi/slack-github-action
id: slack
uses: slackapi/[email protected]
with:
channel-id: "dev-github"
slack-message: "${{ github.repository }}\n${{ github.workflow }} workflow is ${{ job.status }}\nRef: ${{ github.ref }}\nURL: ${{ github.event.pull_request.html_url || github.event.head_commit.url }}"
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
if: always()

0 comments on commit 2d3fbb8

Please sign in to comment.