-
Notifications
You must be signed in to change notification settings - Fork 3
60 lines (58 loc) · 2.34 KB
/
check_508_compliance.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
54
55
56
57
58
59
60
name: Check 508 Compliance
on:
schedule:
- cron: 17 8 * * 1
workflow_dispatch:
inputs:
target_host:
description: Check where?
required: true
default: 'https://stage.dpc.cms.gov'
type: choice
options:
- 'https://stage.dpc.cms.gov'
- 'https://dpc.cms.gov'
jobs:
compliance_check:
name: Compliance Check
runs-on: self-hosted
steps:
- name: Run Axe Check
env:
TARGET_BASE_URL: ${{ inputs.target_host || 'https://stage.dpc.cms.gov' }}
run: |
TARGETS_TO_SCAN="${TARGET_BASE_URL}"
TARGETS_TO_SCAN="${TARGETS_TO_SCAN} ${TARGET_BASE_URL}/faq.html"
TARGETS_TO_SCAN="${TARGETS_TO_SCAN} ${TARGET_BASE_URL}/data.html"
TARGETS_TO_SCAN="${TARGETS_TO_SCAN} ${TARGET_BASE_URL}/pilot.html"
TARGETS_TO_SCAN="${TARGETS_TO_SCAN} ${TARGET_BASE_URL}/docsV1.html"
TARGETS_TO_SCAN="${TARGETS_TO_SCAN} ${TARGET_BASE_URL}/docsV2.html"
TARGETS_TO_SCAN="${TARGETS_TO_SCAN} ${TARGET_BASE_URL}/updates.html"
docker run --init --rm --cap-add=SYS_ADMIN orenfromberg/axe-puppeteer-ci:1.0.0@sha256:f83527a3ae8ab74088c001abfe44836946ba73f0afbbf460447f8a0c40281e70 $TARGETS_TO_SCAN
- uses: slackapi/[email protected]
name: Slack Success
with:
method: chat.postMessage
token: ${{ secrets.SLACK_BOT_TOKEN }}
# Sends to dpc-deploys
payload: |
channel: "CMC1E4AEQ"
attachments:
- color: good
text: "SUCCESS: <${{ github.server_url}}/${{ github.repository}}/actions/runs/${{ github.run_id }}|Static Site 508 Compliance> completed against `${{ inputs.target_host }}`"
mrkdown_in:
- text
- uses: slackapi/[email protected]
name: Slack failure
if: ${{ failure() }}
with:
method: chat.postMessage
token: ${{ secrets.SLACK_BOT_TOKEN }}
# Sends to dpc-deploys
payload: |
channel: "CMC1E4AEQ"
attachments:
- color: danger
text: "FAILURE: <${{ github.server_url}}/${{ github.repository}}/actions/runs/${{ github.run_id }}|Static Site 508 Compliance> completed against `${{ inputs.target_host }}`"
mrkdown_in:
- text