This repository has been archived by the owner on Dec 19, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (44 loc) · 1.57 KB
/
norm.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
name: Norm
on: [pull_request]
# lambdananas -o vera --exclude "Setup.hs:setup.hs:.git:.stack-work:test:tests:bonus" . >> lambdananas-reports.log
jobs:
norm:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Deps
run: |
sudo apt-get update && sudo apt-get install -y curl
curl -fsSL 'https://github.com/Saverio976/dotfiles/raw/main/.local/bin/lambdananas' > /tmp/lambdananas
chmod +x /tmp/lambdananas
- name: Format
run: /tmp/lambdananas -o vera --exclude "Setup.hs:setup.hs:.git:.stack-work:test:tests:bonus" . >> lambdananas-reports.log
- name: Is Empty
id: isEmpty
run: |
if [ "$(cat lambdananas-reports.log)" == "" ]; then
echo "isEmpty=true" >> $GITHUB_OUTPUT
else
echo "isEmpty=false" >> $GITHUB_OUTPUT
fi
- name: Send coding style message Ok
uses: mshick/add-pr-comment@v2
if: steps.isEmpty.outputs.isEmpty == 'true'
with:
message: "No coding style issue"
refresh-message-position: true
message-id: norm-cicd
- name: Send coding style message KO
uses: mshick/add-pr-comment@v2
if: steps.isEmpty.outputs.isEmpty == 'false'
with:
message-path: |
lambdananas-reports.log
refresh-message-position: true
message-id: norm-cicd
- name: Exit Status
run: |
if [ ${{ steps.isEmpty.outputs.isEmpty }} == 'false' ]; then
exit 1
fi