-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathaction.yaml
49 lines (43 loc) · 1.34 KB
/
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: 'Markdown dead link checker'
description: 'This handy tool helps you maintain the integrity of your Markdown files by identifying broken links.'
branding:
icon: 'external-link'
color: 'blue'
inputs:
config:
description: 'Config toml file'
required: false
default: 'pyproject.toml'
version:
description: 'Version of package'
required: false
default: '1.1.0'
python_version:
description: 'Python version'
required: false
default: '3.10'
runs:
using: 'composite'
steps:
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: ${{ inputs.python_version }}
- name: Install md-dead-link-check
run: pip install md-dead-link-check==${{ inputs.version }}
shell: bash
- name: (PR) Get all changed markdown files
id: changed-markdown-files
if: github.event_name == 'pull_request'
uses: tj-actions/changed-files@v43
with:
files: |
**.md
- name: (PR) Check links
if: github.event_name == 'pull_request'
run: md-dead-link-check --config=${{ inputs.config }} --hook ${{ steps.changed-markdown-files.outputs.all_changed_files }}
shell: bash
- name: Check all links
if: github.event_name != 'pull_request'
run: md-dead-link-check --config=${{ inputs.config }}
shell: bash