Skip to content

Commit e0f72cc

Browse files
committed
ci: Github Action workflow define : nvcheck
1 parent 26a01d2 commit e0f72cc

File tree

5 files changed

+99
-0
lines changed

5 files changed

+99
-0
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
FROM golang:1.13
2+
3+
ENV REVIEWDOG_VERSION=v0.10.0
4+
RUN curl -sfL https://raw.githubusercontent.com/reviewdog/reviewdog/master/install.sh | sh -s -- -b $(go env GOPATH)/bin ${REVIEWDOG_VERSION}
5+
6+
RUN go get github.com/koron/nvcheck
7+
8+
COPY entrypoint.sh /entrypoint.sh
9+
10+
ENTRYPOINT ["/entrypoint.sh"]
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: 'Run nvcheck with reviewdog'
2+
description: 'Run dictionary base typo check with reviewdog on pull requests.'
3+
author: 'Tsuyoshi CHO <Tsuyoshi.CHO+develop@Gmail.com>'
4+
inputs:
5+
github_token:
6+
description: 'GITHUB_TOKEN.'
7+
required: true
8+
level:
9+
description: 'Report level for reviewdog [info,warning,error]'
10+
default: 'error'
11+
reporter:
12+
description: |
13+
Reporter of reviewdog command [github-pr-check,github-pr-review].
14+
Default is github-pr-check.
15+
github-pr-review can use Markdown and add a link to rule page in reviewdog reports.
16+
default: 'github-pr-check'
17+
runs:
18+
using: 'docker'
19+
image: 'Dockerfile'
20+
args:
21+
- ${{ inputs.github_token }}
22+
- ${{ inputs.level }}
23+
- ${{ inputs.reporter }}
24+
branding:
25+
icon: 'chevron-down'
26+
color: 'green'
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/sh
2+
3+
cd "$GITHUB_WORKSPACE"
4+
5+
export REVIEWDOG_GITHUB_API_TOKEN="${INPUT_GITHUB_TOKEN}"
6+
7+
find doc -name \*.jax -print0 | xargs -0 nvcheck \
8+
| reviewdog -efm="%f:%l: %m" -name="nvcheck" \
9+
-reporter="${INPUT_REPORTER:-'github-pr-check'}" \
10+
-level="${INPUT_LEVEL}"
11+

.github/workflows/depup.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: depup
2+
on:
3+
schedule:
4+
- cron: '35 9 * * *'
5+
6+
jobs:
7+
depup:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v2
11+
12+
- uses: haya14busa/action-depup@v1
13+
id: depup
14+
with:
15+
file: .github/actions/vimhelp-nvcheck/Dockerfile
16+
version_name: REVIEWDOG_VERSION
17+
repo: reviewdog/reviewdog
18+
19+
- name: Create Pull Request
20+
uses: peter-evans/create-pull-request@v2
21+
with:
22+
token: ${{ secrets.GITHUB_TOKEN }}
23+
title: "chore(deps): update reviewdog to ${{ steps.depup.outputs.latest }}"
24+
commit-message: "chore(deps): update reviewdog to ${{ steps.depup.outputs.latest }}"
25+
body: |
26+
Update reviewdog to [${{ steps.depup.outputs.latest }}](https://github.com/reviewdog/reviewdog/releases/tag/v${{ steps.depup.outputs.latest }})
27+
28+
This PR is auto generated by [depup workflow](https://github.com/${{ github.repository }}/actions?query=workflow%3Adepup).
29+
branch: depup/reviewdog
30+
base: master
31+
labels: 'bump:patch'

.github/workflows/reviewdog.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: reviewdog
2+
on: [push, pull_request]
3+
jobs:
4+
nvcheck:
5+
name: runner / nvcheck
6+
runs-on: ubuntu-latest
7+
steps:
8+
- name: Check out code.
9+
uses: actions/checkout@v2
10+
- name: nvcheck
11+
uses: ./.github/actions/vimhelp-nvcheck/
12+
if: github.event_name != 'pull_request'
13+
with:
14+
github_token: ${{ secrets.github_token }}
15+
reporter: github-check
16+
- name: nvcheck pr-review
17+
uses: ./.github/actions/vimhelp-nvcheck/
18+
if: github.event_name == 'pull_request'
19+
with:
20+
github_token: ${{ secrets.github_token }}
21+
reporter: github-pr-review

0 commit comments

Comments
 (0)