File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed
Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change 1+ name : ltex
2+
3+ on :
4+ pull_request :
5+ branches :
6+ - master
7+ - main
8+
9+ jobs :
10+ build :
11+ runs-on : macos-latest
12+ steps :
13+ - name : Checking out repository
14+ uses : actions/checkout@v4
15+ - name : Install ltex-ls
16+ run : brew install ltex-ls
17+ - name : Run ltex-ls
18+ id : run-ltex-ls
19+ run : |
20+ ltex-cli --client-configuration=paper/ltex.json paper | tee ltex-cli.log
21+ - name : Build comment
22+ id : build-comment
23+ uses : actions/github-script@v6
24+ with :
25+ github-token : ${{ github.token }}
26+ result-encoding : string
27+ script : |
28+ const fs = require('fs');
29+ return "<details>\n<summary>ltex output</summary>\n\n```\n" + fs.readFileSync("${{ github.workspace }}/ltex-cli.log", "utf8").toString() + "\n```\n</details>";
30+ - name : Comment in PR
31+ uses : thollander/actions-comment-pull-request@v2
32+ with :
33+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
34+ message : ${{ steps.build-comment.outputs.result }}
You can’t perform that action at this time.
0 commit comments