Skip to content

Check for license list version #1431

Check for license list version

Check for license list version #1431

Workflow file for this run

name: "Check for license list version"
on:
push:
schedule:
- cron: '0 0 * * *'
jobs:
update:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install Emacs
uses: purcell/setup-emacs@master
with:
version: 28.1
- name: Setup Git
run: |
git config --global user.email "[email protected]"
git config --global user.name "condy"
- name: Check license list version
run: |
remote=$(curl --location --fail --silent --show-error "https://raw.githubusercontent.com/spdx/license-list-data/master/json/licenses.json" | jq .releaseDate)
local=$(grep -Po '"[0-9]{4}-[0-9]{2}-[0-9]{2}"' spdx-data.el)
if [[ "$remote" != "$local" ]]; then
echo "Remote date $remote does not match local date $local"
echo "Starting update"
./admin/spdx-update.sh
echo "Update done"
git push origin master
echo "Push to GitHub done"
exit 0
fi