-
-
Notifications
You must be signed in to change notification settings - Fork 1
72 lines (60 loc) · 2.22 KB
/
gfall.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: Check Kurucz data gfall update workflow
on:
schedule:
- cron: '0 0 * * 0' #runs on every Sunday midnight
workflow_dispatch:
env:
GF_URL: http://kurucz.harvard.edu/linelists/gfall/gfall.dat #URL of the gf values
CHANGES_URL: http://kurucz.harvard.edu/linelists/gfall/changesall.tab #URL of the changes mentioned by Kuruz
CREATION_URL: http://kurucz.harvard.edu/linelists/gfall/creationdates.dat #creation date of each data
README_URL: http://kurucz.harvard.edu/linelists/gfall/00gffix.readme #readme file at Kuruz website
jobs:
build:
runs-on: ubuntu-latest
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}
steps:
- uses: act10ns/slack@v2.0.0
with:
status: starting
message: Starting Check Kurucz data workflow
if: always()
- name: Checkout github repo
uses: actions/checkout@v3
with:
persist-credentials: false
- name: Configure git
run: |
git config --global user.name "GitHub Actions"
git config --global user.email "actions@github.com"
- name: Download data
id: download_data
run: |
mkdir -p linelists/gfall
wget -qO linelists/gfall/gfall.dat $GF_URL
wget -qO linelists/gfall/changesall.dat $CHANGES_URL
wget -qO linelists/gfall/creationdates.dat $CREATION_URL
wget -qO linelists/gfall/readme.dat $README_URL
- name: Compare changes
id: compare
continue-on-error: true
run: |
git add .
git diff --quiet --exit-code --cached
- name: Commit files to git
id: commit_changes
if: ${{ steps.compare.outcome == 'failure' }}
run: |
git commit -m "New dataset added"
- name: Push changes
if: ${{ steps.compare.outcome == 'failure' }}
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}
- name: Report status
uses: act10ns/slack@v2.0.0
with:
status: ${{ job.status }}
steps: ${{ toJson(steps) }}
if: always()