From b71d91cdc809bbdef97406231954de706de83032 Mon Sep 17 00:00:00 2001 From: jdettmannnava <145699825+jdettmannnava@users.noreply.github.com> Date: Mon, 13 Jan 2025 09:11:40 -0500 Subject: [PATCH 1/5] Initialize target base in separate step --- .github/workflows/check_508_compliance.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/check_508_compliance.yml b/.github/workflows/check_508_compliance.yml index bf6b8ce..1a8cf2a 100644 --- a/.github/workflows/check_508_compliance.yml +++ b/.github/workflows/check_508_compliance.yml @@ -19,9 +19,13 @@ jobs: name: Compliance Check runs-on: self-hosted steps: + - name: Set Target Base + -id: target-base + run: | + echo "${{ inputs.target_host || 'https://stage.dpc.cms.gov' }}=TARGET_BASE_URL" >> "$GITHUB_OUTPUT" - name: Run Axe Check env: - TARGET_BASE_URL: ${{ inputs.target_host || 'https://stage.dpc.cms.gov' }} + TARGET_BASE_URL: ${{ steps.target-base.outputs.target-base }} run: | TARGETS_TO_SCAN="${TARGET_BASE_URL}" TARGETS_TO_SCAN="${TARGETS_TO_SCAN} ${TARGET_BASE_URL}/faq.html" @@ -41,7 +45,7 @@ jobs: 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 }}`" + text: "SUCCESS: <${{ github.server_url}}/${{ github.repository}}/actions/runs/${{ github.run_id }}|Static Site 508 Compliance> completed against `${{ steps.target-base.outputs.target-base }}`" mrkdown_in: - text - uses: slackapi/slack-github-action@v2.0.0 @@ -55,6 +59,6 @@ jobs: 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 }}`" + text: "FAILURE: <${{ github.server_url}}/${{ github.repository}}/actions/runs/${{ github.run_id }}|Static Site 508 Compliance> completed against `${{ steps.target-base.outputs.target-base }}`" mrkdown_in: - text From 2738c1c3a8a2c24e1b24ea90669bcc9660aaa165 Mon Sep 17 00:00:00 2001 From: jdettmannnava <145699825+jdettmannnava@users.noreply.github.com> Date: Mon, 13 Jan 2025 09:13:39 -0500 Subject: [PATCH 2/5] typo --- .github/workflows/check_508_compliance.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check_508_compliance.yml b/.github/workflows/check_508_compliance.yml index 1a8cf2a..c2e5d98 100644 --- a/.github/workflows/check_508_compliance.yml +++ b/.github/workflows/check_508_compliance.yml @@ -20,7 +20,7 @@ jobs: runs-on: self-hosted steps: - name: Set Target Base - -id: target-base + id: target-base run: | echo "${{ inputs.target_host || 'https://stage.dpc.cms.gov' }}=TARGET_BASE_URL" >> "$GITHUB_OUTPUT" - name: Run Axe Check From 7e8095e977b76dabf5fd3414ebc580096ac7778c Mon Sep 17 00:00:00 2001 From: jdettmannnava <145699825+jdettmannnava@users.noreply.github.com> Date: Mon, 13 Jan 2025 09:34:32 -0500 Subject: [PATCH 3/5] use correct output --- .github/workflows/check_508_compliance.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/check_508_compliance.yml b/.github/workflows/check_508_compliance.yml index c2e5d98..5e89c8b 100644 --- a/.github/workflows/check_508_compliance.yml +++ b/.github/workflows/check_508_compliance.yml @@ -25,7 +25,7 @@ jobs: echo "${{ inputs.target_host || 'https://stage.dpc.cms.gov' }}=TARGET_BASE_URL" >> "$GITHUB_OUTPUT" - name: Run Axe Check env: - TARGET_BASE_URL: ${{ steps.target-base.outputs.target-base }} + 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" @@ -45,7 +45,7 @@ jobs: 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 }}`" + 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 @@ -59,6 +59,6 @@ jobs: 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 }}`" + 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 From b34932bea14219ca40db7242ccc7175f3a5b7159 Mon Sep 17 00:00:00 2001 From: jdettmannnava <145699825+jdettmannnava@users.noreply.github.com> Date: Mon, 13 Jan 2025 09:45:39 -0500 Subject: [PATCH 4/5] debug --- .github/workflows/check_508_compliance.yml | 36 +--------------------- 1 file changed, 1 insertion(+), 35 deletions(-) diff --git a/.github/workflows/check_508_compliance.yml b/.github/workflows/check_508_compliance.yml index 5e89c8b..071a616 100644 --- a/.github/workflows/check_508_compliance.yml +++ b/.github/workflows/check_508_compliance.yml @@ -27,38 +27,4 @@ jobs: 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 + echo $TARGET_BASE_URL From bf7f683e04678fc9b758d9175bd6b93daf7e72cf Mon Sep 17 00:00:00 2001 From: jdettmannnava <145699825+jdettmannnava@users.noreply.github.com> Date: Mon, 13 Jan 2025 09:47:44 -0500 Subject: [PATCH 5/5] reverse var set --- .github/workflows/check_508_compliance.yml | 38 ++++++++++++++++++++-- 1 file changed, 36 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check_508_compliance.yml b/.github/workflows/check_508_compliance.yml index 071a616..6157f51 100644 --- a/.github/workflows/check_508_compliance.yml +++ b/.github/workflows/check_508_compliance.yml @@ -22,9 +22,43 @@ jobs: - name: Set Target Base id: target-base run: | - echo "${{ inputs.target_host || 'https://stage.dpc.cms.gov' }}=TARGET_BASE_URL" >> "$GITHUB_OUTPUT" + 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: | - echo $TARGET_BASE_URL + 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