Skip to content

Commit

Permalink
citation wf
Browse files Browse the repository at this point in the history
  • Loading branch information
gbayarri committed Jan 21, 2025
1 parent fe7756b commit 86307be
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions .github/workflows/citation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,24 @@ jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2
- uses: peter-murray/workflow-application-token-action@v3
id: generate_token
with:
repository: bioexcel/biobb_chemistry
path: ./
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: Check if file has changed
run: ls -la ./

- 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)
git diff --exit-code CITATION.cff || (git add CITATION.cff && git commit -m "Updated CITATION.cff" && git push)

0 comments on commit 86307be

Please sign in to comment.