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

Configuring a job that runs on a self-hosted runner

Similarly to GitHub-hosted runners, self-hosted runners use the runs-on key within a workflow file. Therefore, you will use a line like the following one in your .yml file:

runs-on: [self-hosted, macOS, dev-runner] 

Self-hosted runners automatically receive a self-hosted label, as well as a label to indicate the operating system and architecture you selected when you were creating a self-hosted runner on your repository's Settings page. In the previous example, macOS is the label automatically generated for the operating system. An architecture label is not being used in this case. Note how dev-runner, a label created using the ./config.sh script, was also used.

The following example is of a workflow used in Chapter 3, A Closer Look at Workflows, to translate issues and issue comments that were written in a language different from English, and this workflow ran on a GitHub-hosted runner. The following code snippet shows...

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 $19.99/month. Cancel anytime