-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yaml
34 lines (31 loc) · 892 Bytes
/
action.yaml
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
name: "Lint Code Blocks in Markdown"
description: "A GitHub Action to lint code blocks in Markdown files."
inputs:
directory:
description: "The base directory to scan for Markdown files."
required: false
default: "."
language:
description: "The language to lint code blocks for."
required: true
default: "python"
runs:
using: "composite"
steps:
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.12'
- name: Install cppcheck
run: |
sudo apt-get update
sudo apt-get install -y cppcheck
shell: bash
- name: Install flake8
run: |
pip install flake8
shell: bash
- name: Run lint script
run: |
python ${{ github.action_path }}/main.py ${{ inputs.directory }} ${{ github.action_path }}/.flake8 ${{ inputs.language }}
shell: bash