Skip to content

Commit

Permalink
add codemeta workflow to update codemeta.json automatically from DESC…
Browse files Browse the repository at this point in the history
…RIPTION
  • Loading branch information
AAoritz committed Feb 5, 2024
1 parent ab74403 commit 23a5429
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/codemeta-github-actions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
on:
push:
branches: master
paths:
- DESCRIPTION
- .github/workflows/main.yml

name: Render codemeta
jobs:
render:
name: Render codemeta
runs-on: macOS-latest
if: "!contains(github.event.head_commit.message, 'cm-skip')"
steps:
- uses: actions/checkout@v1
- uses: r-lib/actions/setup-r@v1
- name: Install codemetar
run: Rscript -e 'install.packages("codemetar")'
- name: Render codemeta
run: Rscript -e 'codemetar::write_codemeta()'
- name: Commit results
run: |
git commit codemeta.json -m 'Re-build codemeta.json' || echo "No changes to commit"
git push https://${{github.actor}}:${{secrets.GITHUB_TOKEN}}@github.com/${{github.repository}}.git HEAD:${{ github.ref }} || echo "No changes to commit"

0 comments on commit 23a5429

Please sign in to comment.