1- name : InvenioRDM GitHub Archiver and CodeMeta2CFF
1+ name : InvenioRDM GitHub Archiver
22env :
33 INVENIO_SERVER : https://data.caltech.edu
44
1010 parent_record : " 6qhkm-7n074"
1111 debug : false
1212
13- # ~~~~~~~~~~ The rest of this file should be left as-is ~~~~~~~~~~
13+ # ╭────────────────────────────────────────────╮
14+ # │ The rest of this file should be left as-is │
15+ # ╰────────────────────────────────────────────╯
16+
17+ name : InvenioRDM GitHub Archiver
1418on :
1519 release :
1620 types : [published]
1721 workflow_dispatch :
1822 inputs :
1923 release_tag :
20- description : " The tag of the release to archive:"
24+ description : The release tag (empty = latest)
25+ parent_record :
26+ description : ID of parent record (for versioning)
27+ community :
28+ description : Name of InvenioRDM community (if any)
2129 draft :
22- default : false
23- description : " Mark the record as a draft: "
30+ description : Mark the record as a draft
31+ type : boolean
2432 all_assets :
25- default : false
26- description : " Attach all GitHub assets: "
33+ description : Attach all GitHub assets
34+ type : boolean
2735 all_metadata :
28- default : false
29- description : " Include additional GitHub metadata:"
30- community :
31- description : " Send record to InvenioRDM community:"
32- parent_record :
33- description : " ID of parent record (for versioning):"
36+ description : Include additional GitHub metadata
37+ type : boolean
38+ debug :
39+ description : Print debug info in the GitHub log
40+ type : boolean
41+
42+ run-name : Archive ${{inputs.release_tag || 'latest release'}} in InvenioRDM
3443jobs :
35- CodeMeta2CFF :
36- runs-on : ubuntu-latest
37- steps :
38- - name : Checkout
39- uses : actions/checkout@v4
40- - name : Convert CFF
41- uses : caltechlibrary/codemeta2cff@main
42- - name : Commit CFF
43- uses : EndBug/add-and-commit@v9
44- with :
45- message : ' Add CITATION.cff for release'
46- add : " ['CITATION.cff']"
47- push : origin HEAD:main
4844 run_iga :
49- name : " Send to ${{needs.get_repository.outputs.server}}"
45+ name : Send to ${{needs.get_repository.outputs.server}}
5046 runs-on : ubuntu-latest
51- needs : [ get_repository, CodeMeta2CFF]
47+ needs : get_repository
5248 steps :
53- - uses : caltechlibrary/iga@main
49+ - uses : caltechlibrary/iga@v1
5450 with :
5551 INVENIO_SERVER : ${{env.INVENIO_SERVER}}
5652 INVENIO_TOKEN : ${{secrets.INVENIO_TOKEN}}
@@ -62,10 +58,11 @@ jobs:
6258 parent_record : ${{github.event.inputs.parent_record || env.parent_record}}
6359 release_tag : ${{github.event.inputs.release_tag || 'latest'}}
6460 get_repository :
65- name : " Get repository name"
61+ name : Get repository name
6662 runs-on : ubuntu-latest
6763 outputs :
6864 server : ${{steps.parse.outputs.host}}
6965 steps :
70- - id : parse
66+ - name : Extract name from INVENIO_SERVER
67+ id : parse
7168 run : echo "host=$(cut -d'/' -f3 <<< ${{env.INVENIO_SERVER}} | cut -d':' -f1)" >> $GITHUB_OUTPUT
0 commit comments