This repository has been archived by the owner on Oct 18, 2024. It is now read-only.
generated from IgrowkerTraining/template-react-vite-ts
-
Notifications
You must be signed in to change notification settings - Fork 6
60 lines (52 loc) · 1.66 KB
/
lint.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
50
51
52
53
54
55
56
57
58
59
60
name: Lint
on:
pull_request:
types: [opened, synchronize, reopened]
branches:
- main
- develop
permissions: {}
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
permissions:
contents: read
packages: read
statuses: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 18
cache: npm
cache-dependency-path: '**/package-lock.json'
- name: Install dependencies
run: npm ci --no-audit --no-fund
- name: Lint
run: npm run lint:ci
- name: Create issue if lint fails
if: failure()
uses: JasonEtco/create-an-issue@v2
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
ACTION_TYPE: 'Lint'
URL_ACTION_RUN: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
BRANCH: ${{ github.ref }}
with:
assignees: ${{ github.event.sender.login }}
- name: Comment on PR if failed
if: failure()
uses: unsplash/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
with:
msg: 'Falló la verificación del Lint :dissapointed:. Por favor revisa los errores y toma las medidas necesarias. Action Run: [Action](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})'
- name: Comment on PR
uses: unsplash/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
with:
msg: 'El linter ha verificado el código :+1: :thumbsup:.'