Update CIFs #32
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: Update CIFs | |
on: | |
schedule: | |
# Every month | |
- cron: '0 0 1 * *' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set-up git | |
run: | | |
git config user.name "GitHub Actions" | |
git config user.email "<>" | |
- name: Update CIFs | |
run: | | |
python -m pip install --upgrade pip | |
pip install numpy wheel | |
pip install -r requirements.txt | |
python -m get_cifs | |
- name: Commit changes if any | |
run: | | |
git add crystals/cifs/*.cif | |
if [ -n "$(git status --porcelain)" ]; | |
then | |
git commit --message "Updated CIFs" | |
git push origin master | |
fi |