forked from xuanxu/paper-action
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yml
86 lines (85 loc) · 2.96 KB
/
action.yml
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
name: Open Journal Paper
description: Compile and generate Paper metadata
inputs:
issue_id:
description: The review issue id for the paper
required: true
repository_url:
description: The repository URL of the submission containing the paper file
required: true
branch:
description: Git branch where the paper is located
required: false
default: ""
journal:
description: The journal data to use for the paper. Default is 'joss'.
required: false
default: neurolibre
journal_template:
description: The journal template to compile the paper with. Default is 'joss'.
required: false
default: neurolibre
compile_mode:
description: Compile a draft PDF or a final accepted paper. Posible values are 'draft' or 'accepted'.
required: false
default: draft
outputs:
pdf_path:
description: "Path to the generated PDF file"
value: ${{ steps.compilation-result.outputs.paper_pdf_path }}
jats_path:
description: "Path to the generated JATS file"
value: ${{ steps.compilation-result.outputs.paper_jats_path }}
crossref_path:
description: "Path to the generated Crossref XML file"
value: ${{ steps.compilation-result.outputs.paper_crossref_path }}
citation_file_path:
description: "Path to the generated CITATION.cff file"
value: ${{ steps.compilation-result.outputs.citation_file_path }}
paper_file_path:
description: "Path to the paper's .md/.tex source file"
value: ${{ steps.paper-finder.outputs.paper_file_path }}
paper_title:
description: "Title of the paper"
value: ${{ steps.paper-finder.outputs.paper_title }}
track_name:
description: "Parameterized name of the paper's track"
value: ${{ steps.paper-finder.outputs.track_name }}
runs:
using: "composite"
steps:
- name: Install Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2.1
bundler-cache: true
cache-version: paper-files
bundler: Gemfile.lock
working-directory: ${{ github.action_path }}
- name: Find paper file
id: paper-finder
shell: bash
env:
ISSUE_ID: ${{ inputs.issue_id }}
REPO_URL: ${{ inputs.repository_url }}
PAPER_BRANCH: ${{ inputs.branch }}
JOURNAL_ALIAS: ${{ inputs.journal }}
COMPILE_MODE: ${{ inputs.compile_mode }}
BUNDLE_GEMFILE: ${{ github.action_path }}/Gemfile
run: |
bundle exec ruby ${{ github.action_path }}/get_paper.rb
- name: Build paper artifacts
id: build-paper
uses: neurolibre/summary-pdf-action@main
with:
journal: ${{ inputs.journal_template }}
paper-path: ${{ steps.paper-finder.outputs.paper_file_path }}
args: ${{steps.paper-finder.outputs.inara_args}}
- name: Check results
id: compilation-result
shell: bash
run: |
ruby ${{ github.action_path }}/check_result.rb ${{ steps.paper-finder.outputs.paper_file_path }} neurolibre,crossref,jats
branding:
icon: file-text
color: blue