Table of Contents

1

Introduction

Learn what GitHub actions are and how they can be used. You might be surprised, but you can do more than just running CI scripts!

2

Creating an action

Learn where Actions live on GitHub, what files are required and how to build your first action by following a step-by-step guide

3

Using your action

Build a workflow that runs the action that you built in response to events on GitHub. Learn how to handle events such as pull_request and push and understand the information available

4

Running your Action locally

The commit, push, wait cycle gets repetitive very quickly. Run your actions locally to reduce the time it takes to get feedback and iterate on your workflows

5

Build a real-world action using Bash

Understand how things work under the hood by building an action that interacts with the GitHub API and data in event.json to automatically add comments when pull requests are merged

6

Building with Node.js

Reimplement the Action from the previous chapter using Node.js, taking advantage of @actions/core and @actions.github to reduce the amount of code you have to write

7

Useful Libraries

Make the most of the GitHub Actions ecosystem, using third party libraries to reduce the amount of code you need to write even further!

8

Writing Unit Tests

Your action's working, congratulations! But how do you know it'll continue to work? How does it handle the edge cases? Learn how to write unit tests for your action by mocking both the event.json and GitHub API

9

Action Runtimes

You can run your action using either the JavaScript or Docker runtimes. Learn about the pros and cons of both options and what the best option is for you

10

Publishing your action

Writing an action isn't where the story ends. Once your action is built, it's time to publish it! Learn what you need to make your action official and publish it in the GitHub Marketplace

11

Bonus Action!

Extra bonus action! Learn how to build an action that runs on a schedule to create an issue every week summarising the activity in a repository

12

Actions Tips and Tricks

I learned the hard way so that you don't have to. Learn about debugging, semantic versioning, secret management and more!

13

Conclusion

Congratulations, you made it to the end! By now you'll know that Actions are for more than just Continuous Integration. You've built multiple actions, configured workflows and released them to the marketplace. I'll leave you with some ideas for even more actions to build to enhance your skills