Skip to content

Commit cfc7e25

Browse files
StaticRocketpraneethbajjuri
authored andcommitted
ci(vale): add a pr check workflow for vale
Add a pull request driven workflow for vale. This is based on the upstream action documentation [1], but limit it to changed files only to keep feedback snappy. This currently uses a fork I made of the upstream action that's capable of using the locally installed version of vale. This allows us to use our container as is, which is faster than reinstalling tools and makes issues more easily reproducible. This is only required until the upstream PR is accepted [2]. This does not enable this action as a blocking check just yet. There is still an upstream bug that makes all feedback throw a failure, which is a little too aggressive right now. Still need to tune things a bit. [1] https://github.com/errata-ai/vale-action [2] errata-ai/vale-action#149 Signed-off-by: Randolph Sapp <[email protected]>
1 parent da45661 commit cfc7e25

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

.github/workflows/vale.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
name: "vale"
3+
4+
on: [pull_request]
5+
6+
defaults:
7+
run:
8+
shell: bash
9+
10+
jobs:
11+
vale:
12+
name: vale
13+
runs-on: ubuntu-latest
14+
container:
15+
image: ghcr.io/staticrocket/processor-sdk-doc:latest
16+
options: --entrypoint /bin/bash
17+
18+
steps:
19+
- name: Prepare GitHub workdir
20+
run: |
21+
mkdir -p /github/home/
22+
23+
- name: Checkout repository
24+
uses: actions/checkout@v4
25+
26+
- name: Get changed files
27+
id: changed-files
28+
uses: tj-actions/changed-files@v46
29+
with:
30+
files: |
31+
**.rst
32+
**.md
33+
34+
- name: Run vale checks on modified files
35+
uses: StaticRocket/vale-action@d377866f2e3305ae80ef6ce6516370a7ec4ea55a
36+
if: steps.changed-files.outputs.any_changed == 'true'
37+
with:
38+
fail_on_error: false # to be changed when upstream addresses 84
39+
files: ${{ steps.changed-files.outputs.all_changed_files }}
40+
version: none

0 commit comments

Comments
 (0)