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

Preface

Mastering GitHub Actions is the ultimate guide for developers and teams looking to harness the full potential of GitHub Actions in professional and business environments. This comprehensive book covers advanced use cases and real-world scenarios to help you automate workflows, optimize collaboration, and streamline the software development process.

Spanning 16 in-depth chapters, this book delves into the capabilities of GitHub Actions, exploring topics such as team and enterprise features, organization defaults, self-hosted runners, and third-party monitoring tools. You’ll learn how to create and manage reusable workflows, design custom templates, integrate with external services, and implement advanced security and access controls. By following practical examples, you’ll gain insights into the best practices for using GitHub Actions in a team setting while also discovering how to leverage organization accounts for improved efficiency and resource management. Throughout the book, you’ll encounter expert advice and valuable tips to help you navigate the complexities of GitHub Actions in a professional context.

Who this book is for

This book is tailored for software engineers, team leads, DevOps engineers, and those keen on refining their engineering processes for speed and efficiency. It offers insights for professionals aiming to harmonize rapid delivery with foundational security. No matter your role, if your goal is to streamline and secure your workflow simultaneously, this book stands as an essential resource.

What this book covers

Chapter 1, An Overview of GitHub and GitHub Actions, serves as a foundational review covering GitHub accounts, plans, and teams and goes through the setup of repositories for the book.

Chapter 2, Exploring Workflows, explores the makeup of a workflow and explores all areas, building the foundational knowledge to move forward through workflow design use cases.

Chapter 3, Deep Dive into Reusable Workflows and Composite Actions, explains how to make the workflows you create in the future reusable and how you can extract out common reusable composite actions.

Chapter 4, Workflow Personalization Using GitHub Apps, shows you how to use apps to provide a personalized feel to your workflow and manage your permissions in a central management plane.

Chapter 5, Using Starter Workflows in Your Team, teaches you how your teams can access your reusable workflows in your team environment.

Chapter 6, Using HashiCorp Vault in GitHub, covers how you can store your secrets in an external secret management store such as HashiCorp Vault.

Chapter 7, Deploying to Azure Using OpenID Connect, describes how you can harness what you’ve learned so far to extend your workflows to deploy to Azure.

Chapter 8, Working with Checks, shows you how to enhance your workflows, as well as create commit statuses and check runs against your commits and pull requests.

Chapter 9, Annotating Code with Actions, helps you understand how to extend the checks and add in annotations, build a linter, and present checks yourself.

Chapter 10, Advancing with Event-Driven Workflows, discusses more about the events available in GitHub and allows you to explore the creation a ChatGPT-powered chatbot in GitHub issues.

Chapter 11, Setting Up Self-Hosted Runners, allows you to explore setting up self-hosted runners on your machine, and then move over to virtual machines and Kubernetes in Azure.

Chapter 12, The Crawler Pattern, explores how to use matrixes to demonstrate the Crawler pattern’s power.

Chapter 13, The Configuration Centralization Pattern, shows you how to use actions to collate environment and repository information and host a launch pad for your organization, building the foundations of an InnerSource portal utilizing GitHub Pages and Actions.

Chapter 14, Using Remote Workflows to Kickstart Your Products, explains the workflow event types to remotely invoke workflows and build a new repository kickstarter experience.

Chapter 15, Housekeeping Tips for Your Organization, covers how to manage the quotas effectively and easily within a team to keep your costs low.

Chapter 16, Handy Workflows for Managing Your Software, describes how you can build pull requests and commit linters and be left with a collection of resources to set you on the journey of building your workflows for the future.

To get the most out of this book

You will need a version of Git installed – the latest will do. All activities within the book were tested on Windows 10 and 11 using version 2.35.1.windows.2. However, they should work with future version releases too. In addition, most applications are OS-agnostic, so you shouldn’t have any issues using them with different OSs. I used Azure CLI version 2.50.0, Minikube 1.31.2, npm 9.6.7, and Node.js 18.17.1 in this book.

All other applications installed are the latest at the time of writing and should work.

Software/hardware covered in the book

Operating system requirements

VS Code

Windows, macOS, or Linux

Azure CLI

Windows, macOS, or Linux

Node.js

Windows, macOS, or Linux

npm

Windows, macOS, or Linux

minikube

Windows, macOS, or Linux

If you are using the digital version of this book, we advise you to type the code yourself or access the code from the book’s GitHub repository (a link is available in the next section). Doing so will help you avoid any potential errors related to the copying and pasting of code.

Download the example code files

You can download the example code files for this book from GitHub at https://github.com/PacktPublishing/Mastering-GitHub-Actions. If there’s an update to the code, it will be updated in the GitHub repository.

We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!

Disclaimer on images

Some images in this title are presented for contextual purposes, and the readability of the graphic is not crucial to the discussion. Please refer to our free graphic bundle to download the images.

Conventions used

There are a number of text conventions used throughout this book.

Code in text: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: “A job is defined within a GitHub Actions workflow using the jobs keyword.”

A block of code is set as follows:

services:
  service1:
    image: my-registry.com/my-service1:latest
  service2:
    image: my-registry.com/my-service2:latest

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

jobs:
  build:
    strategy:
      matrix:
        os: [ubuntu-latest, macos-latest, windows-latest]
        node: [14, 16]

Any command-line input or output is written as follows:

az keyvault secret show --name "ExamplePassword" --vault-name "<your-unique-keyvault-name>" --query "value"

Bold: Indicates a new term, an important word, or words that you see onscreen. For instance, words in menus or dialog boxes appear in bold. Here is an example: “Open the service principal and navigate to Certificate & secrets | Federated Credentials | + Add credential.”

Tips or important notes

Appear like this.

Get in touch

Feedback from our readers is always welcome.

General feedback: If you have questions about any aspect of this book, email us at customercare@packtpub.com and mention the book title in the subject of your message.

Errata: Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you have found a mistake in this book, we would be grateful if you would report this to us. Please visit www.packtpub.com/support/errata and fill in the form.

Piracy: If you come across any illegal copies of our works in any form on the internet, we would be grateful if you would provide us with the location address or website name. Please contact us at copyright@packt.com with a link to the material.

If you are interested in becoming an author: If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, please visit authors.packtpub.com.

Share Your Thoughts

Once you’ve read Mastering GitHub Actions, we’d love to hear your thoughts! Please click here to go straight to the Amazon review page for this book and share your feedback.

Your review is important to us and the tech community and will help us make sure we’re delivering excellent quality content.

Download a free PDF copy of this book

Thanks for purchasing this book!

Do you like to read on the go but are unable to carry your print books everywhere?

Is your eBook purchase not compatible with the device of your choice?

Don’t worry, now with every Packt book you get a DRM-free PDF version of that book at no cost.

Read anywhere, any place, on any device. Search, copy, and paste code from your favorite technical books directly into your application.

The perks don’t stop there, you can get exclusive access to discounts, newsletters, and great free content in your inbox daily

Follow these simple steps to get the benefits:

  1. Scan the QR code or visit the link below
Download a free PDF copy of this book

https://packt.link/free-ebook/9781805128625

  1. Submit your proof of purchase
  2. That’s it! We’ll send your free PDF and other benefits to your email directly
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 €14.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