Skip to content

Commit 57e05ff

Browse files
authored
Merge pull request #223 from puja-trivedi/cell_taxonomy_model
add manual workflow to generate other formats for a chosen schema
2 parents b47aec8 + 46fefde commit 57e05ff

2 files changed

Lines changed: 39 additions & 3 deletions

File tree

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: manual-generate-other-formats
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
model_name:
7+
description: 'Schema/model name to generate other formats for (without the .yaml extension)'
8+
required: true
9+
type: choice
10+
options:
11+
- anatomical_structure
12+
- assertion_evidence
13+
- bke_taxonomy
14+
- cell_taxonomy
15+
- genome_annotation
16+
- library_generation
17+
linkml_version:
18+
description: 'linkml version to use (optional, by default it uses one from the pyproject.toml)'
19+
required: false
20+
type: string
21+
branch_name:
22+
description: 'Branch name to be used for the commit (optional, defaults to committing on the current branch)'
23+
required: false
24+
type: string
25+
26+
permissions:
27+
contents: write
28+
pull-requests: write
29+
30+
jobs:
31+
generate_from_reusable:
32+
uses: brain-bican/models/.github/workflows/reusable-generate_other_formats.yaml@main
33+
with:
34+
model_name: ${{ github.event.inputs.model_name }}
35+
linkml_version: ${{ github.event.inputs.linkml_version }}
36+
branch_name: ${{ github.event.inputs.branch_name }}

.github/workflows/reusable-generate_other_formats.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ jobs:
2929
uses: actions/checkout@v3
3030
with:
3131
fetch-depth: 0
32-
repository: ${{ github.event.pull_request.head.repo.full_name }}
33-
ref: ${{ github.event.pull_request.head.ref }}
32+
repository: ${{ github.event.pull_request.head.repo.full_name || github.repository }}
33+
ref: ${{ github.event.pull_request.head.ref || github.ref_name }}
3434

3535
- name: Set up Python
3636
uses: actions/setup-python@v4
@@ -41,7 +41,7 @@ jobs:
4141
run: python -m pip install .[test]
4242

4343
- name: Updating linkml if requested
44-
if: ${{ inputs.linkml_version != null }}
44+
if: ${{ inputs.linkml_version != '' }}
4545
run: |
4646
pip install linkml==${{ inputs.linkml_version }}
4747
echo "linkml version: ${{ inputs.linkml_version }} has been installed"

0 commit comments

Comments
 (0)