-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaction.yml
More file actions
50 lines (45 loc) · 1.31 KB
/
action.yml
File metadata and controls
50 lines (45 loc) · 1.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: "CodeForerunner Doc Check"
description: "Detect documentation drift — finds docs that contradict actual repo state. No-op without forerunner.config.yaml."
author: "derek-palmer"
branding:
icon: "book-open"
color: "blue"
inputs:
python-version:
description: "Python version to use"
required: false
default: "3.11"
version:
description: "codeforerunner version to install (default: latest)"
required: false
default: "latest"
repo:
description: "Path to the repository to check"
required: false
default: ${{ github.workspace }}
fail-on-drift:
description: "Exit non-zero if drift is detected"
required: false
default: "true"
runs:
using: composite
steps:
- uses: actions/setup-python@v6.2.0
with:
python-version: ${{ inputs.python-version }}
- name: Install codeforerunner
shell: bash
run: |
if [ "${{ inputs.version }}" = "latest" ]; then
pip install codeforerunner
else
pip install "codeforerunner==${{ inputs.version }}"
fi
- name: Run forerunner check
shell: bash
run: |
if [ "${{ inputs.fail-on-drift }}" = "true" ]; then
forerunner check --repo "${{ inputs.repo }}"
else
forerunner check --repo "${{ inputs.repo }}" || true
fi