0%

Build, test, and deploy code right from your GitHub repository by automating, customizing, and executing software development workflows with GitHub Actions

Key Features

  • Enhance your CI/CD and DevOps workflows using GitHub Actions
  • Discover how to create custom GitHub Actions using Docker and JavaScript
  • Get up and running with building a CI/CD pipeline effectively

Book Description

GitHub Actions is one of the most popular products that enables you to automate development tasks and improve your software development workflow. Automating Workflows with GitHub Actions uses real-world examples to help you automate everyday tasks and use your resources efficiently.

This book takes a practical approach to helping you develop the skills needed to create complex YAML files to automate your daily tasks. You'll learn how to find and use existing workflows, allowing you to get started with GitHub Actions right away. Moving on, you'll discover complex concepts and practices such as self-hosted runners and writing workflow files that leverage other platforms such as Docker as well as programming languages such as Java and JavaScript. As you advance, you'll be able to write your own JavaScript, Docker, and composite run steps actions, and publish them in GitHub Marketplace! You'll also find instructions to migrate your existing CI/CD workflows into GitHub Actions from platforms like Travis CI and GitLab. Finally, you'll explore tools that'll help you stay informed of additions to GitHub Actions along with finding technical support and staying engaged with the community.

By the end of this GitHub book, you'll have developed the skills and experience needed to build and maintain your own CI/CD pipeline using GitHub Actions.

What you will learn

  • Get to grips with the basics of GitHub and the YAML syntax
  • Understand key concepts of GitHub Actions
  • Find out how to write actions for JavaScript and Docker environments
  • Discover how to create a self-hosted runner
  • Migrate from other continuous integration and continuous delivery (CI/CD) platforms to GitHub Actions
  • Collaborate with the GitHub Actions community and find technical help to navigate technical difficulties
  • Publish your workflows in GitHub Marketplace

Who this book is for

This book is for anyone involved in the software development life cycle, for those looking to learn about GitHub Actions and what can be accomplished, and for those who want to develop a new skill to help them advance their software development career. If you are new to GitHub and GitHub Actions in general, then this book is for you. Basic knowledge of GitHub as a platform will help you to get the most out of this book.

Table of Contents

  1. Automating Workflows with GitHub Actions
  2. Contributors
  3. About the author
  4. About the reviewer
  5. Preface
    1. Who this book is for
    2. What this book covers
    3. To get the most out of this book
    4. Download the color images
    5. Conventions used
    6. Get in touch
    7. Share Your Thoughts
  6. Section 1:Introduction and Overview of Technologies Used with GitHub Actions
  7. Chapter 1: Learning the Foundations for GitHub Actions
    1. Technical requirements
    2. Understanding the basics of CI/CD
    3. A brief trip through the history of software development
    4. Introduction to GitHub: creating a user account
    5. Creating a free user account on GitHub
    6. Creating a PAT
    7. About SSH keys
    8. Checking for existing SSH keys
    9. Adding your SSH key to your GitHub user account
    10. Discovering the basics of Git and GitHub
    11. Configuring Git
    12. Basic Git commands
    13. Basics of GitHub
    14. Pull requests
    15. Settings
    16. Branches
    17. Actions
    18. Secrets
    19. Introduction to YAML
    20. Basic rules
    21. YAML components
    22. Summary
  8. Chapter 2: Deep Diving into GitHub Actions
    1. Learning about GitHub Actions' core concepts and components
    2. Events
    3. Jobs
    4. Steps
    5. Actions
    6. Runners
    7. Understanding the basics of workflows
    8. Learning the basics of the workflow file syntax
    9. Writing and customizing workflow files
    10. Using the Actions tab to find and customize workflow templates
    11. Securing your GitHub Actions
    12. Secrets – how to create and use them
    13. Creating encrypted secrets at the repository level
    14. Creating encrypted secrets at the environment level
    15. Using encrypted secrets in a workflow
    16. Best practices for securing self-hosted runners
    17. Summary
  9. Section 2: Advanced Concepts and Hands-On Exercises to Create Actions
  10. Chapter 3: A Closer Look at Workflows
    1. Reviewing the webhook events that trigger workflows
    2. Branch or tag creation
    3. Deployment creation and deployment status
    4. Issues
    5. Issue_comment
    6. Project
    7. Pull request
    8. Pull request review
    9. Authenticating within a workflow
    10. Overview
    11. Permissions
    12. Alternative authentication methods
    13. Understanding contexts, environment variables, and expressions
    14. Contexts
    15. Expressions
    16. Managing the workflow run
    17. Visualizing a workflow run
    18. Workflow run logs
    19. Summary
  11. Chapter 4: Working with Self-Hosted Runners
    1. Technical requirements
    2. Creating a self-hosted runner
    3. Overview
    4. Architecture and operating systems supported by self-hosted runners
    5. Communication with GitHub
    6. Adding the GitHub Actions runner application to your repository
    7. Configuring a job that runs on a self-hosted runner
    8. Managing a self-hosted runner
    9. Understanding the status of self-hosted runners
    10. Reviewing logs
    11. The automatic update process
    12. Removing a self-hosted runner
    13. Summary
  12. Chapter 5: Writing Your Own Actions
    1. Technical requirements
    2. Overview
    3. Types of actions
    4. Reviewing the metadata syntax
    5. Using exit codes
    6. Adding exit codes to a JavaScript action
    7. Adding exit codes to a Docker container action
    8. Creating a JavaScript action
    9. Prerequisites
    10. Defining the action
    11. Writing the action logic
    12. Ensuring all works as expected
    13. Creating a Docker container action
    14. Prerequisites
    15. Creating a Dockerfile in your GitHub repository
    16. Defining the action
    17. Writing the action logic
    18. Ensuring all works as expected
    19. Creating a composite run steps action
    20. Prerequisites
    21. Defining the action
    22. Ensuring all works as expected
    23. Summary
  13. Chapter 6: Marketplace – Finding Existing Actions and Publishing Your Own
    1. Technical requirements
    2. Overview
    3. Finding existing actions
    4. Publishing your own actions
    5. Prerequisites
    6. Preparing and publishing your action
    7. Removing your action from GitHub Marketplace
    8. Summary
  14. Section 3: Customizing Existing Actions, Migrations, and the Future of GitHub Actions
  15. Chapter 7: Migrations
    1. Technical requirements
    2. Considerations before you migrate
    3. Migrating from Azure Pipelines
    4. Syntax differences
    5. Migrating from GitLab CI/CD
    6. Syntax differences
    7. Migrating from Jenkins
    8. Syntax differences
    9. Summary
  16. Chapter 8: Contributing to the Community and Finding Help
    1. Technical requirements
    2. Hands-on learning
    3. Interacting with the GitHub Actions community
    4. Helping to improve GitHub Actions
    5. Requesting technical support
    6. Summary
  17. Chapter 9: The Future of GitHub Actions
    1. Technical requirements
    2. Checking the GitHub roadmap
    3. Reading the GitHub blog and changelog
    4. Connecting through social media
    5. Summary
    6. Why subscribe?
  18. Other Books You May Enjoy
    1. Packt is searching for authors like you
    2. Share Your Thoughts
3.142.199.138