Skip to content

Merge pull request #97 from NewGraphEnvironment/92-dft-stac-composite… #29

Merge pull request #97 from NewGraphEnvironment/92-dft-stac-composite…

Merge pull request #97 from NewGraphEnvironment/92-dft-stac-composite… #29

name: Update CITATION.cff
on:
push:
branches: [main]
paths:
- 'DESCRIPTION'
workflow_dispatch:
permissions:
contents: write
jobs:
update-citation:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true
- uses: r-lib/actions/setup-r-dependencies@v2
with:
packages: cffr
- name: Update CITATION.cff
run: Rscript -e 'x <- cffr::cff_create(); x$references <- NULL; cffr::cff_write(x = x)'
- name: Commit if changed
run: |
if ! git diff --quiet CITATION.cff; then
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add CITATION.cff
git commit -m "Auto-update CITATION.cff from DESCRIPTION"
git push
fi