-
Notifications
You must be signed in to change notification settings - Fork 4
49 lines (41 loc) · 1.44 KB
/
eslint.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# .github/workflows/eslint.yml
name: ESLint # name of the action (displayed in the github interface)
on: # event list
push: # on push to each of these branches
branches:
- dev
- fix
- master
pull_request:
branches:
- dev
- master
env: # environment variables (available in any part of the action)
NODE_VERSION: 16
jobs: # list of things to do
linting:
name: ESLint # job name (unique id)
runs-on: ubuntu-latest # on which machine to run
steps: # list of steps
- name: Install NodeJS
uses: actions/setup-node@v2
with:
node-version: ${{ env.NODE_VERSION }}
- name: Code Checkout
uses: actions/checkout@v2
- name: Install Dependencies
run: npm i
- name: Code Linting
run: npm run eslint
- name: Telegram notify
if: failure()
uses: appleboy/telegram-action@master
with:
to: ${{ secrets.TELEGRAM_PLUGINS_TO }}
token: ${{ secrets.TELEGRAM_REVIEWER_TOKEN }}
message: |
Hi, <strong>${{ github.actor }}</strong>! Your commit for <strong>${{ github.repository }}</strong>
contains 💯 the best solution but it have to be fixed!
<a href="${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}">Auto-Tests <strong>ESLint</strong></a> build failed ⛔!
format: html
disable_web_page_preview: true