-
Notifications
You must be signed in to change notification settings - Fork 6
/
action.yml
44 lines (44 loc) · 1.25 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
name: Run axe Accessibility Linter
description: Lints all changed files using the axe DevTools Linter
branding:
icon: "check-circle"
color: "blue"
inputs:
github_token:
description: Github Token
required: true
api_key:
description: axe Linter API Key
required: true
axe_linter_url:
description: axe Linter URL
required: false
default: https://axe-linter.deque.com
runs:
using: "composite"
steps:
- uses: actions/checkout@v4
- uses: mikefarah/yq@bbdd97482f2d439126582a59689eb1c855944955
- name: Get changed files
id: changed_files
env:
GITHUB_TOKEN: ${{ inputs.github_token }}
uses: tj-actions/changed-files@c3a1bb2c992d77180ae65be6ae6c166cf40f857c
with:
files: |
**/*.js
**/*.jsx
**/*.tsx
**/*.html
**/*.vue
**/*.md
**/*.markdown
- name: Run axe linter
if: steps.changed_files.outputs.any_changed == 'true'
run: ${{ github.action_path }}/axe-linter.sh
env:
GITHUB_TOKEN: ${{ inputs.github_token }}
API_KEY: ${{ inputs.api_key }}
CHANGED_FILES: ${{ steps.changed_files.outputs.all_changed_files }}
AXE_LINTER_URL: ${{ inputs.axe_linter_url }}
shell: bash