Reader small image

You're reading from  GitHub Actions Cookbook

Product typeBook
Published inApr 2024
PublisherPackt
ISBN-139781835468944
Edition1st Edition
Concepts
Right arrow
Author (1)
Michael Kaufmann
Michael Kaufmann
author image
Michael Kaufmann

Michael Kaufmann believes that developers and engineers can be happy and productive at work. He loves DevOps, GitHub, Azure, and modern work. Microsoft has awarded him with the title Microsoft Regional Director (RD) and Microsoft Most Valuable Professional (MVP) – the latter in the category of DevOps and GitHub. Michael is also the founder and managing director of Xebia Microsoft Services, Germany – a consulting company that helps its customers become digital leaders by supporting them in their cloud, DevOps, and digital transformation. Michael shares his knowledge in books, training, and as a frequent speaker at international conferences.
Read more about Michael Kaufmann

Right arrow

Using environments for approvals and checks

In this recipe, we are going to use environment approvals to acquire approval before creating the repository. We will also use a GitHub App to authenticate as the repository creation normally happens in the organization scope and cannot be done with GITHUB_TOKEN. You must either use a GitHub App or a personal access token (PAT) with the right scopes.

Getting ready…

Make sure you have completed the previous recipe and continue in the same repository.

How to do it…

  1. In your repository, go to Setting | Environments and click New environment.
  2. Name the environment repo-creation and click Configure environment.
  3. Add yourself as Required reviewer and don’t allow administrators to bypass the rule (see Figure 5.7).
Figure 5.7 – Configuring the environment protection rules

Figure 5.7 – Configuring the environment protection rules

  1. Click Save protection rules.
  2. The next step is to create an app to authenticate. I recommend...
lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
GitHub Actions Cookbook
Published in: Apr 2024Publisher: PacktISBN-13: 9781835468944

Author (1)

author image
Michael Kaufmann

Michael Kaufmann believes that developers and engineers can be happy and productive at work. He loves DevOps, GitHub, Azure, and modern work. Microsoft has awarded him with the title Microsoft Regional Director (RD) and Microsoft Most Valuable Professional (MVP) – the latter in the category of DevOps and GitHub. Michael is also the founder and managing director of Xebia Microsoft Services, Germany – a consulting company that helps its customers become digital leaders by supporting them in their cloud, DevOps, and digital transformation. Michael shares his knowledge in books, training, and as a frequent speaker at international conferences.
Read more about Michael Kaufmann