From 07d5122fe04cc9c18c31fd14b15a8a515259e45b Mon Sep 17 00:00:00 2001 From: gbayarri Date: Tue, 28 May 2024 10:12:31 +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..f77bb9d --- /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_analysis + 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