Check 508 Compliance #27
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: Set Target Base | |
id: target-base | |
run: | | |
echo "TARGET_BASE_URL=${{ inputs.target_host || 'https://stage.dpc.cms.gov' }}" >> "$GITHUB_OUTPUT" | |
- name: Run Axe Check | |
env: | |
TARGET_BASE_URL: ${{ steps.target-base.outputs.TARGET_BASE_URL }} | |
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/slack-github-action@v2.0.0 | |
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 `${{ steps.target-base.outputs.TARGET_BASE_URL }}`" | |
mrkdown_in: | |
- text | |
- uses: slackapi/slack-github-action@v2.0.0 | |
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 `${{ steps.target-base.outputs.TARGET_BASE_URL }}`" | |
mrkdown_in: | |
- text |