Skip to content

citation wf

citation wf #20

Workflow file for this run

name: Sync Citation.cff
on:
schedule:
- cron: '0 0 * * 1' # Runs every Monday
push:
branches:
- master
jobs:
sync:
runs-on: ubuntu-latest
steps:
- uses: peter-murray/workflow-application-token-action@v3
id: generate_token
with:
application_id: ${{ vars.GHAPUSH }}
application_private_key: ${{ secrets.GHAPUSH }}
- uses: actions/checkout@v3
with:
token: ${{ steps.generate_token.outputs.token }}
- name: Download file using wget
run: wget -O ./CITATION.cff https://raw.githubusercontent.com/bioexcel/biobb/master/CITATION.cff
- name: Commit and push changes if file has changed
env:
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
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)