GitHub Actions Day 7: Starter Workflows

December 7, 2019

This is day 7 of my GitHub Actions Advent Calendar. If you want to see the whole list of tips as they're published, see the index.

If you've only created one or two GitHub Actions workflows, you may not have paid much attention to how you got started. But the GitHub Actions team has. They've worked hard to make it as easy as possible to get started with Actions.

The first thing that GitHub looks at when you're creating a new workflow is the type of code in your repository. GitHub Actions uses the proven linguist tool to understand what kind of code your repository contains. This is the same tool that powers a number of other parts of GitHub, including the language stats bar on your repository's home page.

GitHub Language Toolbar

With this JavaScript-heavy repository, GitHub Actions will select two possible workflows - a Node.js CI/CD workflow that runs npm run build and npm test, useful for applications, and a packaging workflow that does the same build and test run, then publishes a package to GitHub Packages.

Node.js Starter Workflows

And GitHub Actions has more than just the ability to build and test your projects. There are also workflows to help you get started deploying your application to the cloud, whether that's AWS, Azure or Google Cloud.

Cloud Starter Workflows

And, of course, as good as linguist is, it's not perfect. And many people have a mix of different projects in the same repository, so you can also expand out the entire list of starter workflows.

Other Starter Workflows

If you want to help improve the starter workflows - whether that's making a change to an existing workflow, or adding a whole new language, they're all checked in on GitHub.