Skip to content

Check Kurucz data gfall update workflow #4

Check Kurucz data gfall update workflow

Check Kurucz data gfall update workflow #4

Workflow file for this run

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/[email protected]
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 "[email protected]"
- 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/[email protected]
with:
status: ${{ job.status }}
steps: ${{ toJson(steps) }}
if: always()