-
Notifications
You must be signed in to change notification settings - Fork 2
/
action.yml
53 lines (50 loc) · 1.33 KB
/
action.yml
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
51
52
53
name: 'linksafe-action'
branding:
icon: 'check'
color: 'purple'
description: 'Check all links and ensure they are not broken'
inputs:
dirs:
description: 'File path for each directory to scan'
required: false
default: '.'
whitelist_links: # id of input
description: 'Links to ignore even if they"re broken'
required: false
default: 'None'
whitelist_files:
description: 'Files that will not be scanned'
required: false
verbose:
description: 'Whether output should be verbose or not'
required: false
default: false
#outputs:
# link-status: # id of output
# description: 'Whether or not the check passed'
runs:
using: 'composite'
steps:
- name: setup python
uses: actions/setup-python@v3
with:
python-version: "3.9"
- name: install dependencies
run: pip install requests
shell: bash
- name: checkout repo
uses: actions/checkout@v3
- name: Run action
run: |
python3 ${{ github.action_path }}/src/scan_file.py
env:
INPUT_DIRS: ${{ inputs.DIRS }}
INPUT_WHITELIST_LINKS: ${{ inputs.WHITELIST_LINKS }}
INPUT_WHITELIST_FILES: ${{ inputs.WHITELIST_FILES }}
INPUT_VERBOSE: ${{ inputs.VERBOSE }}
shell: bash
- name: Write summary
if: always()
run: |
cat tmp.txt >> $GITHUB_STEP_SUMMARY
shell: bash