What are GitHub Actions and why should you use them?
GitHub Actions are the way to natively automate things on NIH GitHub. It is a great idea to automate things such as version numbering or release notes to help save your team valuable time. Another benefit of automating things such as linters or testing is that it will not only save you time, but also improve the quality of your product/project.
You can either create your very own, or discover existing Actions by other developers in the Marketplace.
Example use cases with GitHub Actions
GitHub Actions Basics
An event would trigger a workflow which uses an action to complete the job
| Events | ➡️ | Workflows | ➡️ | Actions |
| —— | - | ——— | - | ——- |
| Events are essentially webhook events created from activity on GitHub
Example events:
- Someone pushes code
- A new pull request is opened
- A new comment has been posted to an issue | ➡️ | Workflows let you codify useful processes to your liking
They belong in YAML files in a special directory in your repository:.github/workflows
| ➡️ | Actions are reusable units of code made available to your workflows
GitHub runs them in a Node.js runtime or in Docker containers and are referenced from workflows |