Wednesday, 30 August 2023

Show HN: Write Github Actions Workflows in Typescript Rather Than YAML https://bit.ly/3OUIM5z

Show HN: Write Github Actions Workflows in Typescript Rather Than YAML Hey HN, I just released github-actions-workflow-ts, an NPM package that allows you to write GitHub Actions workflows in Typescript rather than YAML. The package then generates GH Actions workflow YAML files from your Typescript code. Why? - Type safety - Code re-usability: package and reuse common jobs and steps across different workflows. - Imperative edge: Utilize control flow to control the generation of different kinds of workflows easily. Essentially, I realized that as I write larger and more complicated GH Actions workflows in YAML, they become less readable and thus more prone to errors and harder to maintain/refactor. You can try it out on Replit (free but requires an account to fork my examples and run them yourself). Fork it and run the build command in the shell: - Simple Example: https://bit.ly/44vTqWc... - Advanced Example: https://bit.ly/44vTqWc... Read the accompanying blog post here: https://bit.ly/44r2X0V... Please check it out. I'm open to any feedback as I march towards the first stable 1.0.0 release. Thanks https://bit.ly/44xw1ne August 30, 2023 at 01:56PM

No comments:

Post a Comment