Dil*_*pan 3 annotations github github-actions github-check-run
寻找一种方法来禁用 Github Actions 检查从注释文件运行。
/* 上下文 - 处理 eslint 工作流程操作来评论 PR,因为默认情况下运行注释所有文件的此检查很烦人 */
当问题匹配器在日志中找到匹配项时,就会添加注释。
例如。setup-node注册 eslint 问题匹配器。可以通过以下方式删除
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '12'
- run: |
echo "::remove-matcher owner=eslint-compact::"
echo "::remove-matcher owner=eslint-stylish::"
Run Code Online (Sandbox Code Playgroud)
您还可以使用我编写的 eslint 操作,该操作对更改的文件运行 linter。https://github.com/sibiraj-s/action-eslint。您可以通过传递输入参数来禁用注释annotations: false
name: Lint
on:
pull_request:
push:
branches:
- master
jobs:
eslint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '14'
- run: npm ci # or yarn install
- uses: sibiraj-s/action-eslint@v1
with:
extensions: 'js, jsx, ts, tsx'
annotations: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Run Code Online (Sandbox Code Playgroud)
在这里阅读有关问题匹配器的更多信息
https://github.com/actions/toolkit/blob/master/docs/commands.md#problem-matchers
中等文章,用于在其他操作中禁用注释。https://sibiraj-s.medium.com/disable-annotations-in-github-actions-ff938d5ea4f3
| 归档时间: |
|
| 查看次数: |
3570 次 |
| 最近记录: |