Skip to content

Commit

Permalink
citation GitHub Action
Browse files Browse the repository at this point in the history
  • Loading branch information
gbayarri committed May 28, 2024
1 parent 8c9f5b4 commit 8fca2bb
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/citation.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Sync Citation.cff

on:
schedule:
- cron: '0 0 * * 1' # Runs every Monday
push:
branches:
- master

jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2
with:
repository: bioexcel/biobb_structure_utils
path: ./

- name: Download file using wget
run: wget -O ./CITATION.cff https://raw.githubusercontent.com/bioexcel/biobb/master/CITATION.cff

- name: Check if file has changed
run: ls -la ./

- name: Commit and push changes if file has changed
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git diff --exit-code CITATION.cff || (git add CITATION.cff && git commit -m "Updated CITATION.cff" && git push)

0 comments on commit 8fca2bb

Please sign in to comment.