Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/workflows/cffconvert.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: cffconvert

on:
push:
branches:
- 'master'
- 'release-*'
paths:
- CITATION.cff
pull_request:
branches:
- 'master'
- 'release-*'
paths:
- CITATION.cff
Comment on lines +3 to +15
Copy link
Copy Markdown
Member

@DilumAluthge DilumAluthge Feb 10, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently, this workflow will not be triggered on pull requests that come from forks.

I think the behavior we want is this:

  1. If the CITATION.cff file was modified, and this is a pull request, and the base (target) branch of the pull request is either master or release-*, then run the workflow.
  2. If the CITATION.cff file was modified, and this is a push to either master or release-*, then run the workflow.
  3. Else, do not run the workflow.

I think that the following suggestion implements the above behavior, although it would be good for someone else to double-check.

Suggested change
on:
push:
paths:
- CITATION.cff
on:
push:
branches:
- 'master'
- 'release-*'
paths:
- CITATION.cff
pull_request:
branches:
- 'master'
- 'release-*'
paths:
- CITATION.cff


permissions:
contents: read

jobs:
validate:
name: "validate"
runs-on: ubuntu-latest
steps:
- name: Check out a copy of the repository
uses: actions/checkout@v2
Comment thread
abelsiqueira marked this conversation as resolved.
Outdated
with:
persist-credentials: false

- name: Check whether the citation metadata from CITATION.cff is valid
uses: citation-file-format/cffconvert-github-action@2.0.0
with:
args: "--validate"
1 change: 1 addition & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Official format description at https://citation-file-format.github.io
cff-version: 1.2.0
message: "Cite this paper whenever you use Julia"
authors:
Expand Down