-
Notifications
You must be signed in to change notification settings - Fork 4
38 lines (34 loc) · 1.04 KB
/
update.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
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