Update notifications and info boxes styles for accessibility #34
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: Font update check | |
# **What it does**: Checks that the font cachebuster parameter has been updated if the font file has changed | |
# **Why we have it**: To make sure that browser font caching is invalidated and the updated font is used | |
# **Who does it impact**: Any PR which changes the font file | |
on: | |
pull_request: | |
types: [synchronize, opened] | |
paths: | |
- 'plugins/Morpheus/fonts/matomo.*' | |
permissions: | |
actions: read | |
checks: read | |
contents: read | |
deployments: none | |
issues: read | |
packages: none | |
pull-requests: read | |
repository-projects: none | |
security-events: none | |
statuses: read | |
jobs: | |
check: | |
runs-on: "ubuntu-latest" | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Compare stylesheet to base branch | |
run: | | |
if [[ $(wget -O - -o /dev/null https://raw.githubusercontent.com/matomo-org/matomo/$GITHUB_BASE_REF/plugins/Morpheus/stylesheets/base/icons.css | grep -m1 -- "format('woff2')") == $(grep -m1 -- "format('woff2')" plugins/Morpheus/stylesheets/base/icons.css) ]] | |
then | |
line=$(grep -n "format('woff2')" plugins/Morpheus/stylesheets/base/icons.css | cut -f1 -d:) | |
echo "::error file=plugins/Morpheus/stylesheets/base/icons.css,line=$line::Font cachebuster parameter not updated. See https://developer.matomo.org/guides/matomo-font" | |
exit 1 | |
else | |
exit 0 | |
fi |