zenodo integration #2
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: cffconvert | |
on: | |
push: | |
branches-ignore: | |
- main | |
paths: | |
- CITATION.cff | |
permissions: | |
contents: write | |
jobs: | |
convert: | |
name: "convert citations" | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out a copy of the repository | |
uses: actions/checkout@v3 | |
- name: Convert CITATION.cff to Zenodo metadata format | |
uses: citation-file-format/cffconvert-github-action@2.0.0 | |
with: | |
args: "--infile ./CITATION.cff --format zenodo --outfile .zenodo.json" | |
- name: Commit and push Zenodo metadata | |
run: | | |
if [[ `git status --porcelain` ]]; then | |
git config user.name 'github-actions[bot]' | |
git config user.email 'github-actions[bot]@users.noreply.github.com' | |
git add .zenodo.json | |
git commit -m "Automated update of Zenodo metadata" | |
git push | |
else | |
echo "No changes to the .zotero.json file." | |
fi |