Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Automating Workflows with GitHub Actions

You're reading from   Automating Workflows with GitHub Actions Automate software development workflows and seamlessly deploy your applications using GitHub Actions

Arrow left icon
Product type Paperback
Published in Nov 2021
Publisher Packt
ISBN-13 9781800560406
Length 216 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Priscila Heller Priscila Heller
Author Profile Icon Priscila Heller
Priscila Heller
Arrow right icon
View More author details
Toc

Table of Contents (14) Chapters Close

Preface 1. Section 1:Introduction and Overview of Technologies Used with GitHub Actions
2. Chapter 1: Learning the Foundations for GitHub Actions FREE CHAPTER 3. Chapter 2: Deep Diving into GitHub Actions 4. Section 2: Advanced Concepts and Hands-On Exercises to Create Actions
5. Chapter 3: A Closer Look at Workflows 6. Chapter 4: Working with Self-Hosted Runners 7. Chapter 5: Writing Your Own Actions 8. Chapter 6: Marketplace – Finding Existing Actions and Publishing Your Own 9. Section 3: Customizing Existing Actions, Migrations, and the Future of GitHub Actions
10. Chapter 7: Migrations 11. Chapter 8: Contributing to the Community and Finding Help 12. Chapter 9: The Future of GitHub Actions 13. Other Books You May Enjoy

Authenticating within a workflow

The workflow examples throughout this book often show ${{ secrets.GITHUB_TOKEN }}. Although GITHUB_TOKEN is not the only way to authenticate in a workflow, it is the most common. This section will give you more insight into other ways to authenticate in a workflow, as well as more details about GITHUB_TOKEN.

Overview

When you enable GitHub Actions in your repository, GitHub automatically does two things: it installs a GitHub App on your repository and creates a GITHUB_TOKEN. GITHUB_TOKEN works as a GitHub App token, which means that you can use it to authenticate on behalf of the GitHub App. GITHUB_TOKEN is short-lived and expires when the job is finished. GitHub then obtains an installation access token for the next job before the job starts.

Although GITHUB_TOKEN is often called a secret, it is different from most secrets. While you need to add environment secrets to the settings of your repository, as shown in Chapter 2, Deep Diving into...

lock icon The rest of the chapter is locked
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.
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 £16.99/month. Cancel anytime