SAP / ai-sdk-js

Integrate chat completion into your business applications with SAP Cloud SDK for AI. Leverage the Generative AI Hub of SAP AI Core to make use of templating, grounding, data masking, content filtering and more. Access all features of SAP AI Core with the SAP Cloud SDK for AI.
Apache License 2.0
15 stars 0 forks source link

chore: Reuse actions #162

Closed marikaner closed 1 week ago

marikaner commented 1 week ago

Context

I recently learned about composite actions and reusable workflows. We currently have to configure three actions + run pnpm install in every job, so I though we might benefit from merging those into one setup action.

The advantage is, that we can save a bit of configuration overhead and never forget adding a cache to the setup node cache (which happened before).

Caveats

The downside is, that now all configuration for all actions is summarized into one, which potentially mixes concerns. We could work around this by prefixing all of the inputs with node-, pnpm and checkout. On a first glance I have the impression that it isn't big enough of a deal to do this.

Another change is, that we currently have two places, where we maintain the default node and pnpm version: in the github variables and in the action. The reason for this is, that in the action we cannot access the variables. An alternative could be that the node-version and pnpm version are required and always handed it externally. Also, currently the default node version is only used in one other place and the pnpm version is not used anywhere anymore, so we could consider deleting this.

If you need any additional parameters for one of the underlying actions, you would have to expose it through the action as well.