-
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathaction.yml
More file actions
53 lines (51 loc) · 1.39 KB
/
Copy pathaction.yml
File metadata and controls
53 lines (51 loc) · 1.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: cff-validator
author: Diego Hernangómez
description: "Validate your repository's CITATION.cff file using R software"
branding:
icon: 'book-open'
color: 'gray-dark'
inputs:
citation-path:
description: 'Path to .cff file to be validated. By default it selects a
CITATION.cff file on the root of the repository.'
required: false
default: 'CITATION.cff'
cache-version:
description: 'Soft deprecated'
required: false
default: 1
install-r:
description: 'Soft deprecated'
required: false
default: true
# pak cache management derived from https://github.com/r-lib/actions/blob/v2-branch/setup-r-dependencies/action.yaml
# By Jim Hester
runs:
using: composite
steps:
- name: Validate cff
uses: dieghernan/cff-validator/docker@05739cf16bedafd7a4d6e770286be38947f38117 # v5 - Review on release
with:
cffpath: "${{ inputs.citation-path }}"
# Report check
- name: Upload results
shell: bash
run: |
# Upload results
cat citation_cff.md >$GITHUB_STEP_SUMMARY
- name: Check for errors
id: err
shell: bash
run: |
# Identify errors
err=false
if test -f "issue.md"; then
err=true
fi
echo "error=$err" >> $GITHUB_OUTPUT
- name: Fail workflow
if: steps.err.outputs.error == 'true'
shell: bash
run: |
echo "::error:: CFF file has errors, see Job Summary"
exit 1