-
Notifications
You must be signed in to change notification settings - Fork 68
45 lines (42 loc) · 1.56 KB
/
update-axe-core.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
name: Update axe-core
on:
schedule:
# Run every night at midnight
- cron: '0 0 * * *'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- id: update
uses: dequelabs/update-axe-core@v1
- id: type
run: |
CommitType=""
if [ "${{ steps.update.outputs.patch_version_updated }}" == "true" ]; then
CommitType="fix"
elif [ "${{ steps.update.outputs.minor_version_updated }}" == "true" ]; then
CommitType="feat"
elif [ "${{ steps.update.outputs.major_version_updated }}" == "true" ]; then
CommitType="feat"
else
echo "No axe-core update available. Cancelling."
gh run cancel ${{ github.run_id }};
gh run watch ${{ github.run_id }};
fi
echo "type=$CommitType" >>"$GITHUB_OUTPUT"
- name: Open PR
uses: peter-evans/create-pull-request@v4
with:
token: ${{ secrets.PAT }}
commit-message: '${{ steps.type.outputs.type }}: Update axe-core to v${{ steps.update.outputs.version }}'
branch: auto-update-axe-core
base: develop
title: '${{ steps.type.outputs.type }}: Update axe-core to v${{ steps.update.outputs.version }}'
body: |
This patch updates version of [`axe-core`](https://npmjs.org/axe-core) to v${{ steps.update.outputs.version }}.
This PR was opened by a robot :robot: :tada:.