Reader small image

You're reading from  Mastering GitHub Actions

Product typeBook
Published inMar 2024
PublisherPackt
ISBN-139781805128625
Edition1st Edition
Concepts
Right arrow
Author (1)
Eric Chapman
Eric Chapman
author image
Eric Chapman

Eric Chapman holds the position of Senior Delivery and Engineering Manager at a leading retailer in home improvement and trade in Australia and New Zealand. He primarily oversees integration, encompassing platforms such as API Gateway, EventMesh, authorization systems, developer portals, and extract, transform and load (ETL) platforms. Eric leads a team with a broad range of responsibilities and skills, overseeing all business areas. Previously, Eric and his team were instrumental in designing and developing an in-house point-of-sale system. This singular application accommodated four countries' tax and auditing requirements, supported multiple payment processing gateways, and incorporated a range of unique market-leading features.
Read more about Eric Chapman

Right arrow

Using Remote Workflows to Kickstart Your Products

In this chapter, we will explore how to implement a template-based strategy for starting new products leveraging GitHub repository dispatch events. This approach not only initiates projects but also offers flexibility for incorporating any additional tools you might need.

You will learn how to develop a kickstarter workflow. This workflow enables the safe use of centralized repository templates and assists in assembling the essential components for establishing a new repository. It’s a flexible setup that utilizes GitHub templates and events to facilitate a step-by-step process for swiftly setting up a new repository, complete with all the governance and tools needed to begin development immediately.

By the end of this chapter, you will gain a thorough understanding of these GitHub features and how they can be used to expedite the launch of new projects. You’ll be prepared to start each new project on the right track...

Technical requirements

To follow along with the hands-on material in this chapter, you will need to follow the steps in the previous chapter or access the resources from that chapter and refer back to it if anything is ambiguous to you. We will continue to use our self-hosted runners to make these changes.

You’ll need to create a new private repository called EventHub.GitHub for hosting and running the eventing workflows. Initialize the repository with a README file.

We’re also going to need another scratchpad called public-scratchpad, which we’ll use for anything we cannot test using our private scratchpad (there are some free plan limitations). Create the repository as a public repository and initialize the repository with a README.

You’ll need to create a new GitHub application called Jedi-Onboarder that has the following permissions (if you need a refresher, check out the Setting up a GitHub app section in Chapter 11):

  • Repository level...

Introducing repository dispatch events

Repository dispatch events in GitHub are webhook events that allow you to trigger a workflow run on GitHub Actions from an external service. Unlike other events automatically triggered by actions within GitHub (such as push, pull request, or release events), repository dispatch events are user-defined. They must be manually sent to the repository using the GitHub API. This makes them incredibly flexible, as they can be used to integrate GitHub Actions internally and externally with systems and services.

We can liken repository dispatch events to a PUT REST request. Being able to describe a basic endpoint using an actions workflow is a pretty powerful feature.

Let’s dive into the events further in the next section.

Advantages of repository dispatch events

Repository dispatch events in GitHub are a unique and powerful feature designed to give developers great flexibility and control over their automation workflows. Let’...

Understanding product kickstarters

Imagine you’re building a house. Instead of starting from scratch, what if you could begin with a pre-designed foundation, walls, and essential structures? This is precisely what product kickstarters in the software world offer. In essence, Product Kickstarters are pre-packaged, templated software solutions such as .NET templates, Node.js templates, or Create React App (CRA) in React. They provide a foundational structure for your software project, enabling you to start with a robust, pre-configured base.

In this section, we’ll discuss each component required to get you from nothing to a standardized offering in the least steps.

A brief overview of product kickstarters

Product kickstarters act as the foundational blueprints and frameworks in the software world. They streamline the development process, enforce best practices, and serve as a learning platform, while still allowing the creation of unique, tailor-made projects....

Internal developer portal and other use cases

The success of your kickstarter offers hinges crucially on two factors: awareness and trust among your consumers. A vital tool in achieving this is the InnerSource portal we developed in the last chapter, which allows us to collate and showcase important repositories and metrics within an organization. This portal is an excellent platform for promoting your templates within the team. You significantly increase the likelihood of adopting these templates by providing a dedicated space where various teams can host their templates and offer detailed usage instructions. Similarly, the concept of reusable workflows suffers from a lack of visibility and knowledge. Often, teams redundantly replicate build processes simply because they are unaware of existing resources or do not know who else is utilizing them. To address this, making these workflows visible and accessible through a centralized platform can be highly effective.

In recent years...

Summary

Closing off this chapter, we’ve covered key strategies for quickly and effectively launching projects in today’s rapid software development landscape. The primary focus has been on the GitHub repository_dispatch event, an essential tool for initiating and onboarding projects quickly and efficiently.

We delved into a template-based approach for kickstarting new products within an organization. This method is more than just a way to start projects; it offers the flexibility to include additional tools as needed, making it a versatile solution for various project requirements. We then created a kickstarter workflow to demonstrate how to do this. We also briefly explored the role of internal developer portals and other related use cases, highlighting their contribution to a more efficient project onboarding process.

In the next chapter, we’ll look over housekeeping tips for your organization and how we can make things easier to find through further extensions...

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Mastering GitHub Actions
Published in: Mar 2024Publisher: PacktISBN-13: 9781805128625
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime

Author (1)

author image
Eric Chapman

Eric Chapman holds the position of Senior Delivery and Engineering Manager at a leading retailer in home improvement and trade in Australia and New Zealand. He primarily oversees integration, encompassing platforms such as API Gateway, EventMesh, authorization systems, developer portals, and extract, transform and load (ETL) platforms. Eric leads a team with a broad range of responsibilities and skills, overseeing all business areas. Previously, Eric and his team were instrumental in designing and developing an in-house point-of-sale system. This singular application accommodated four countries' tax and auditing requirements, supported multiple payment processing gateways, and incorporated a range of unique market-leading features.
Read more about Eric Chapman