Registry Monitor #259
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: Registry Monitor | |
on: | |
schedule: | |
- cron: '0 0 * * 0' | |
jobs: | |
bcp47-monitor: | |
name: BCP47 Registry Monitor | |
runs-on: ubuntu-latest | |
steps: | |
- name: apt | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y --no-install-recommends curl git | |
- name: checkout | |
uses: actions/checkout@v2 | |
with: | |
path: source | |
- name: fetch registry | |
run: | | |
curl -sL https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry > net-registry | |
- name: compare registry hashes | |
run: | | |
localsha=($(sha256sum source/languagetag-bcp47/data/registry)) | |
remotesha=($(sha256sum net-registry)) | |
if [[ $localsha == $remotesha ]]; then | |
exit 0 | |
else | |
echo 'detected difference in local and source BCP47 registries' | |
exit 1 | |
fi |