-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaction.yml
More file actions
184 lines (179 loc) · 6.41 KB
/
action.yml
File metadata and controls
184 lines (179 loc) · 6.41 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
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
name: same-version
description: >
Checks whether your GitHub tag/release version matches the version declared in CITATION.cff,
pyproject.toml, codemeta.json, .zenodo.json, package.json, and setup.py.
Canonical tag version is parsed using PEP 440, but package.json uses SemVer comparison.
author: Will Riley <wanderingwill@gmail.com>
inputs:
fail_for_missing_file:
description: 'Fail for any checked file that is missing'
required: false
default: 'false'
check_github_event:
description: 'check-github-event'
required: false
default: 'false'
github_event_name:
description: 'GitHub event name (push, release, or pull_request event)'
required: false
github_event_ref:
description: 'GitHub ref (for push event)'
required: false
github_event_release_tag:
description: 'GitHub release tag name (for release event)'
required: false
check_citation_cff:
description: 'Check `CITATION.cff`? (`true/false`)'
required: false
default: 'true'
citation_cff_path:
description: 'Path to CITATION.cff'
required: false
default: 'CITATION.cff'
check_pyproject_toml:
description: 'Check pyproject.toml? (true/false)'
required: false
default: 'true'
pyproject_toml_path:
description: 'Path to pyproject.toml'
required: false
default: 'pyproject.toml'
check_codemeta_json:
description: 'Check codemeta.json? (true/false)'
required: false
default: 'true'
codemeta_json_path:
description: 'Path to codemeta.json'
required: false
default: 'codemeta.json'
check_zenodo_json:
description: 'Check .zenodo.json? (true/false)'
required: false
default: 'true'
zenodo_json_path:
description: 'Path to .zenodo.json'
required: false
default: '.zenodo.json'
check_package_json:
description: 'Check package.json? (true/false)'
required: false
default: 'true'
package_json_path:
description: 'Path to package.json'
required: false
default: 'package.json'
check_setup_py:
description: 'Check setup.py? (true/false)'
required: false
default: 'true'
setup_py_path:
description: 'Path to setup.py'
required: false
default: 'setup.py'
check_r_description:
description: 'Check R DESCRIPTION file? (true/false)'
required: false
default: 'true'
r_description_path:
description: 'Path to R DESCRIPTION file'
required: false
default: 'DESCRIPTION'
check_composer_json:
description: 'Check composer.json? (true/false)'
required: false
default: 'true'
composer_json_path:
description: 'Path to composer.json'
required: false
default: 'composer.json'
check_pom_xml:
description: 'Check pom.xml? (true/false)'
required: false
default: 'true'
pom_xml_path:
description: 'Path to pom.xml'
required: false
default: 'pom.xml'
check_cargo_toml:
description: 'Check cargo.toml? (true/false)'
required: false
default: 'true'
cargo_toml_path:
description: 'Path to Cargo.toml'
required: false
default: 'Cargo.toml'
check_setup_cfg:
description: 'Check setup.cfg? (true/false)'
required: false
default: 'true'
setup_cfg_path:
description: 'Path to setup.cfg'
required: false
default: 'setup.cfg'
check_py_version_assignment:
description: 'Check Python file with __version__ assignment? (true/false)'
required: false
default: 'false'
py_version_assignment_path:
description: 'Path to Python file with __version__ assignment'
required: false
check_nuspec:
description: 'Check .nuspec? (true/false)'
required: false
default: 'true'
nuspec_path:
description: 'Path to .nuspec'
required: false
default: '.nuspec'
check_ro_crate_metadata_json:
description: 'Check ro-crate-metadata.json? (true/false)'
required: false
default: 'false'
ro_crate_metadata_json_path:
description: 'Path to ro-crate-metadata.json'
required: false
default: 'ro-crate-metadata.json'
ro_crate_metadata_json_id:
description: '@id of the resource in ro-crate-metadata.json'
required: false
runs:
using: "composite"
steps:
- name: Install action with pip
run: pip install --force-reinstall ${{ github.action_path }} # the --force-reinstall avoids caching issues from external dependencies which may rely on this action
shell: bash
- name: Run same-version
id: check_same_version
run: |
same-version \
--check-citation-cff "${{ inputs.check_citation_cff }}" \
--citation-cff-path "${{ inputs.citation_cff_path }}" \
--check-pyproject-toml "${{ inputs.check_pyproject_toml }}" \
--pyproject-toml-path "${{ inputs.pyproject_toml_path }}" \
--check-codemeta-json "${{ inputs.check_codemeta_json }}" \
--codemeta-json-path "${{ inputs.codemeta_json_path }}" \
--check-zenodo-json "${{ inputs.check_zenodo_json }}" \
--zenodo-json-path "${{ inputs.zenodo_json_path }}" \
--check-package-json "${{ inputs.check_package_json }}" \
--package-json-path "${{ inputs.package_json_path }}" \
--check-setup-py "${{ inputs.check_setup_py }}" \
--setup-py-path "${{ inputs.setup_py_path }}" \
--check-r-description "${{ inputs.check_r_description }}" \
--r-description-path "${{ inputs.r_description_path }}" \
--check-composer-json "${{ inputs.check_composer_json }}" \
--composer-json-path "${{ inputs.composer_json_path }}" \
--check-pom-xml "${{ inputs.check_pom_xml }}" \
--pom-xml-path "${{ inputs.pom_xml_path }}" \
--check-cargo-toml "${{ inputs.check_cargo_toml }}" \
--cargo-toml-path "${{ inputs.cargo_toml_path }}" \
--check-py-version-assignment "${{ inputs.check_py_version_assignment }}" \
--py-version-assignment-path "${{ inputs.py_version_assignment_path }}" \
--check-ro-crate-metadata-json "${{ inputs.check_ro_crate_metadata_json }}" \
--ro-crate-metadata-json-path "${{ inputs.ro_crate_metadata_json_path }}" \
--ro-crate-metadata-json-id "${{ inputs.ro_crate_metadata_json_id }}" \
--check-github-event "${{ inputs.check_github_event }}" \
--github-event-name "${{ inputs.github_event_name }}" \
--github-event-ref "${{ inputs.github_event_ref }}" \
--github-event-release-tag "${{ inputs.github_event_release_tag }}" \
--fail-for-missing-file "${{ inputs.fail_for_missing_file }}"
shell: bash