Closed CAMOBAP closed 3 years ago
Can we also take this chance to use the Metanorma actions? I think we are not fully utilising their benefits...
We already use actions-mn/setup@master
in sample
repos https://github.com/metanorma/metanorma-build-scripts/blob/master/cimas-config/gh-actions/samples/generate.yml#L40
@ronaldtse do you mean that we should convert the whole workflow like https://github.com/metanorma/metanorma-build-scripts/blob/master/cimas-config/gh-actions/master/rake.yml into one 'meta' action? or anything else
@CAMOBAP I think we also want the "site build" command to be an action. (not the rake ones)
e.g. it can have options: which file is the manifest (default metanorma.yml
), whether to agree to terms, etc.
@ronaldtse I just rethink this, trying to understand what benefits we gain from convert run: metanorma site generate --agree-to-terms
into:
- uses: actions-mn/site-gen@master
with:
manifest: manifest.yml
directory: .
output: site
agree-to-terms: true
There is not much logic that we can change inside this actions-mn/site-gen@master
to keep the workflow code unchanged.
The benefit is if we change the shell command arguments again (e.g. if we add another required parameter) we only need to update the GH Action...
@ronaldtse site-gen action is done in new repo https://github.com/actions-mn/cli
I used a different approach with "composite" actions which is simple and fit perfectly for such utility actions. Let me know if we should create a similar tasks for compile or any other subcommand
https://github.com/metanorma/metanorma-cli/issues/235#issuecomment-848048091