build and release on push workflow #30
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ChkTeX | |
on: | |
pull_request: | |
branches: | |
- master | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checking out repository | |
uses: actions/checkout@v4 | |
- name: LaTeX linter (chktex) | |
uses: dpo/chktex-action@main | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build comment | |
id: build-comment | |
uses: actions/github-script@v6 | |
with: | |
github-token: ${{ github.token }} | |
result-encoding: string | |
script: | | |
const fs = require('fs'); | |
return "<details>\n<summary>Chktex output</summary>\n\n```\n" + fs.readFileSync("${{ github.workspace }}/chktex_output.txt", "utf8").toString() + "\n```\n</details>"; | |
- name: Comment in PR | |
uses: thollander/actions-comment-pull-request@v2 | |
with: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
message: ${{ steps.build-comment.outputs.result }} |