Skip to content

Commit

Permalink
Axe Workflow Fix (#27)
Browse files Browse the repository at this point in the history
<!-- markdownlint-disable-next-line first-line-heading -->
## Description

<!-- Describe your changes in detail. -->
This fixes the Run Axe Dependency Check workflow so that it actually
works.

## Context

<!-- Why is this change required? What problem does it solve? -->
This allows for the workflow to attempt an axe.js update from the branch
the workflow is run from.

## Type of changes

<!-- What types of changes does your code introduce? Put an `x` in all
the boxes that apply. -->

- [ ] Refactoring (non-breaking change)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would change existing
functionality)
- [x] Bug fix (non-breaking change which fixes an issue)

## Checklist

<!-- Go over all the following points, and put an `x` in all the boxes
that apply. -->

- [ ] I am familiar with the [contributing
guidelines](../docs/CONTRIBUTING.md)
- [x] I have followed the code style of the project
- [ ] I have added tests to cover my changes
- [ ] I have updated the documentation accordingly
- [ ] This PR is a result of pair or mob programming

---

## Sensitive Information Declaration

To ensure the utmost confidentiality and protect your and others
privacy, we kindly ask you to NOT including [PII (Personal Identifiable
Information) / PID (Personal Identifiable
Data)](https://digital.nhs.uk/data-and-information/keeping-data-safe-and-benefitting-the-public)
or any other sensitive data in this PR (Pull Request) and the codebase
changes. We will remove any PR that do contain any sensitive
information. We really appreciate your cooperation in this matter.

- [x] I confirm that neither PII/PID nor sensitive data are included in
this PR and the codebase changes.

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
davethepunkyone and github-actions[bot] authored Nov 5, 2024
1 parent 751ddbd commit 7fffadc
Show file tree
Hide file tree
Showing 3 changed files with 253 additions and 148 deletions.
33 changes: 31 additions & 2 deletions .github/workflows/axe-dependency-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,36 @@ on: [workflow_dispatch]
jobs:
axe-dependency-check:
name: "Axe Version Check"
runs-on: ubuntu-latest
timeout-minutes: 10

steps:
- name: "Axe Version Check"
uses: ./.github/actions/check-axe-version
- name: Checkout code
uses: actions/checkout@v4
- run: |
git checkout ${{ github.head_ref || github.ref_name }}
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 'latest'
- name: Install axe-core in temp dir
run: |
cd utils/resources
mkdir temp
cd temp
npm install axe-core
- name: Retrieve axe.js file
run: |
cd utils/resources/temp/node_modules/axe-core
mv axe.js ../../../
- name: Remove temp directory
run: |
cd utils/resources
rm -rf temp
- name: Commit to axe-dependency-check branch
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add utils/resources/axe.js
git commit -m "axe-core automated update"
git push
Loading

0 comments on commit 7fffadc

Please sign in to comment.