In today’s rapidly evolving software realm, automation is one of the most important aspects of productivity. GitHub Actions, renowned for its adaptability, has evolved into an essential companion for developers worldwide.
What is Github Actions
According to GitHub, they describe it as
GitHub Actions makes it easy to automate all your software workflows, now with world-class CI/CD. Build, test, and deploy your code right from GitHub. Make code reviews, branch management, and issue triaging work the way you want.
Essentially in its simplest core, it’s basically a script that is triggered based on an action like push, create issue, create pull request etc. These scripts are then defined in YAML format and the developer can chain multiple steps based on different trigger criteria.
Some GitHub actions are triggered manually with some pre-configured parameters such as choosing the branch to run the action on (can be accessed by the tab called “Actions” at the top of every repo page.
GitHub also presents a way of logging the history of all previously run tasks for tracking purposes.
As a general precaution, I strongly recommend using only reliable actions and apps in your workflow. These tools have access to your codebase and can potentially disrupt certain aspects of your application. Additionally, it’s essential to consider the aspect of ‘privacy’ when evaluating such integrations.
My must have GitHub Actions
These are the most vital GitHub actions that I found useful in my personal projects.
-
Auto Assign PR The most annoying thing about Github, is that when you open a PR its author is unassigned, and you have to manually select yourself. This action is my first thing to install in any project
-
Action PR Title This action handles the OCD developer in the team that is annoyed by different naming conventions. This action forces a regex check on the PR title which will eventually be used as the commit message.
-
Slack Action Tired of checking if your CI actions are complete? With this custom action you will be notified in the dev slack channel if the job was successful or not.
-
Pull Preview A very useful feature for spinning up preview URLs on AWS. All you need is an SSH user that is able to create servers on AWS Lightsail and a docker-compose.yml that is used to bootstrap your application. After the instance is up and running, it will report back into the pull request by submitting the preview URL as a comment which is so convenient. Amazon Lightsail offers easy-to-use virtual private server (VPS) instances, containers, storage, databases, and more at a cost-effective monthly price.
-
Jira Software + Github The must have app for your github repo when working with Jira as your ticket management system. Upon giving it access, it adds a tab in Jira with the Pull Requests opened related to the given ticket based on the branch name which must include the ticket number.
Develop your own GitHub Action
While most of the time you can find anything you need in the GitHub marketplace, you can also write your own action for full flexibility. Follow this guide on how to proceed with your new exciting mini project!