From 8fca2bb15d52b7518e26e87bf62a4c2df12dff40 Mon Sep 17 00:00:00 2001 From: gbayarri Date: Tue, 28 May 2024 11:04:29 +0200 Subject: [PATCH] citation GitHub Action --- .github/workflows/citation.yaml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/citation.yaml diff --git a/.github/workflows/citation.yaml b/.github/workflows/citation.yaml new file mode 100644 index 0000000..109d81c --- /dev/null +++ b/.github/workflows/citation.yaml @@ -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) \ No newline at end of file