metanorma / ci

Build scripts for Metanorma, works with continuous integration
3 stars 2 forks source link

Make ruby 3.0 required #65

Closed CAMOBAP closed 3 years ago

CAMOBAP commented 3 years ago

https://github.com/metanorma/metanorma-cli/issues/235#issuecomment-848048091

ronaldtse commented 3 years ago

Can we also take this chance to use the Metanorma actions? I think we are not fully utilising their benefits...

CAMOBAP commented 3 years ago

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

ronaldtse commented 3 years ago

@CAMOBAP I think we also want the "site build" command to be an action. (not the rake ones)

https://github.com/metanorma/metanorma-build-scripts/blob/f258ce0dd0928fa00471a1fa8dd96c304027d17c/cimas-config/gh-actions/samples/generate.yml#L42

e.g. it can have options: which file is the manifest (default metanorma.yml), whether to agree to terms, etc.

CAMOBAP commented 3 years ago

@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.

ronaldtse commented 3 years ago

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...

CAMOBAP commented 3 years ago

@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