Create a Custom GitHub Action @DevLeonardo
Create a Custom GitHub Action  @DevLeonardo
Uploaded June 2023 | Updated November 2026, 4 days ago
GitHub Actions are a powerful tool to automate your workflow. They can be used to run tests, deploy your code, publish a package, and much more.

The cool thing is, there's a GitHub Actions Marketplace where you can find a lot of actions created by... the community. But what if you can't find the action you need? You can create your own and publish it there!

During this course, we'll create an action with Typescript that will add a label to new pull requests automatically.

In this tutorial, we're going to see in detail how to:
- Create a GitHub Action in Typescript
- Expand our Action to support custom inputs
- Integrate with GitHub's API to add labels to Pull Requests
- Unit testing our action
- Debugging in Visual Studio Code
- Publishing our action to the GitHub Marketplace
- Using our action in another repository
- Some final touches to make our project more robust

USEFUL RESOURCES
Action repo: github.com/Balastrong/ga-label-issue
Article: https://leonardomontini.dev/typescript-github-action/
Run Actions Locally with act: youtu.be/Ugonll0e2Os
Trigger Actions Manually: youtu.be/KGfncu595pc
Git Aliases: youtu.be/Uk4GnYoQx_I

_______________________________
Hit like and subscribe for more content! :D
Join the Discord community! Here's the invite: discord.gg/bqwyEa6We6

You can also follow me on the other platforms:
Twitter: twitter.com/Balastrong
dev.to: dev.to/balastrong
Home: https://leonardomontini.dev/
TikTok: tiktok.com/@balastrong
GitHub: github.com/Balastrong
Instagram: instagram.com/devbalastrong
_______________________________
TIMESTAMPS
00:00 Summary
01:36 Building Blocks
04:42 Running the Action
07:43 Read custom inputs
08:27 Interact with GitHub API
15:25 GITHUB_TOKEN incident
15:56 Unit test your Action
19:27 Debug on Visual Studio Code
21:57 Publish on GitHub Marketplace
24:50 Use your Action on other repositories
25:55 Final touches to make it more robust
29:42 Closing remarks
_______________________________
Sound effects from zapsplat.com

#github #githubactions #tutorial
Create a Custom GitHub ActionWRONG Package Manager, Again?Dark/Light/System Theme on TanStack StartTanStack Router: Authenticated Routes (Guards)How well measure performance of our DevRel activitiesFantastic JSON Schemas and where to find themAstro Coding Session: Series feature on my blogTanStack Start: A Full-Stack React Framework but Client-FirstTanStack React Form: Basic Validation (with shadcn/ui & React)Copilot Chat writes Unit Tests for you!TanStack React Form: Advanced ValidationUsing Copilot Chat 2024 Updates
Dev Leonardo |

Create a Custom GitHub Action

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER