Automating Workflows with GitHub Actions
eBook - ePub

Automating Workflows with GitHub Actions

Priscila Heller

Share book
  1. 216 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

Automating Workflows with GitHub Actions

Priscila Heller

Book details
Book preview
Table of contents
Citations

About This Book

Build, test, and deploy code right from your GitHub repository by automating, customizing, and executing software development workflows with GitHub ActionsKey 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 effectivelyBook DescriptionGitHub 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 MarketplaceWho this book is forThis 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.

Frequently asked questions

How do I cancel my subscription?
Simply head over to the account section in settings and click on “Cancel Subscription” - it’s as simple as that. After you cancel, your membership will stay active for the remainder of the time you’ve paid for. Learn more here.
Can/how do I download books?
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
What is the difference between the pricing plans?
Both plans give you full access to the library and all of Perlego’s features. The only differences are the price and subscription period: With the annual plan you’ll save around 30% compared to 12 months on the monthly plan.
What is Perlego?
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Do you support text-to-speech?
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Is Automating Workflows with GitHub Actions an online PDF/ePUB?
Yes, you can access Automating Workflows with GitHub Actions by Priscila Heller in PDF and/or ePUB format, as well as other popular books in Computer Science & Entreprise Applications. We have over one million books available in our catalogue for you to explore.

Information

Year
2021
ISBN
9781800569034
Edition
1

Section 1:Introduction and Overview of Technologies Used with GitHub Actions

In this section, you will get a basic understanding of the technologies that make using GitHub Actions possible. An overview of what Continuous Integration/Continuous Deployment (CI/CD) is will also be included. 
The following chapters will be covered in this section:
  • Chapter 1, Learning the Foundations for GitHub Actions
  • Chapter 2, Deep-Diving into GitHub Actions

Chapter 1: Learning the Foundations for GitHub Actions

Independently of your current level of expertise, by the time you have finished reading the last chapter in this book, you will have completed all the steps needed to implement a cohesive Continuous Integration/Continuous Delivery (CI/CD) workflow using GitHub Actions. You will also have familiarity with many other systems and practices that have helped GitHub Actions gain popularity in the software development and DevOps world.
Automation is the heart of most modern DevOps practices. Many tools have been created to allow for automated tests, builds, and deployment, and GitHub Actions is one of those tools. It is an elegant solution that offers the convenience of creating and managing CI and CD workflows from GitHub, the largest code-hosting platform in the world.
It is important to understand the basic concepts of CI and CD before creating and managing GitHub Actions workflows. It is also relevant to learn about some of the technologies that make GitHub Actions possible, such as GitHub—the platform where all GitHub Actions live— and YAML Ain't Markup Language, commonly known as YAML—the markup language that powers GitHub Actions workflows. In this chapter, you will learn more about the following topics:
  • Understanding the basics of CI/CD
  • Introduction to GitHub: creating a user account
  • Discovering the basics of Git and GitHub
  • Introducing YAML

Technical requirements

In this introductory chapter, you will create a GitHub account and a GitHub repository and will review a YAML file, as hands-on practice in preparation for the subsequent chapters in this book. To accomplish all that, you will need the following:
  • A computer or laptop with access to the internet, and modern browsers, such as the latest versions of Safari, Firefox, Chrome, and Microsoft Edge.
  • A command-line utility: For macOS and Linux, you will need a system such as Terminal, where you can run shell and Git commands. For Windows, you will need to download and install Git Bash, if you do not already have it installed.
  • An email address, which you will need in order to create a GitHub account.
  • A text editor such as Atom, Visual Studio Code (VS Code), Sublime, and so on.

Understanding the basics of CI/CD

Before jumping into the core concepts of CI and CD, it is helpful to understand more about the history and evolution of the software development life cycle. While this section will not present a comprehensive list of all software development methods that may have led to the progress and adoption of CI and CD practices, it will present relevant concepts that will help illustrate why CI and CD are widely adopted today.

A brief trip through the history of software development

Many believe that software engineering dates back to the 1960s. During that time, software engineering and computing in general were costly, which likely nudged software engineers into practicing software development in a similar way to how hardware production was done. In other words, software development started as a slow, cautious, and methodical practice that followed a sequence of steps aimed at delivering perfect products. This method is known currently as the Waterfall model, which is composed of seven phases, each of which depends on the successful and sequential completion of the previous phase. The Waterfall model is known for its inflexible, process-oriented, and sequential nature.
Over time, many issues surfaced in the Waterfall model. For example, extensive and time-consuming planning and approvals were needed before software engineers even had the chance to start writing code. By the time software was written, tested, and deployed, months had passed and customers' needs had changed completely. The Waterfall model did not allow for many iterations, and when changes were needed, this was a long and expensive process that often created bottlenecks and resulted in obsolete or unused features.
While the Waterfall model was predominant between the 1960s and 1980s, there was an awareness that a fast, flexible, lightweight, product-focused, and people-focused—as opposed to process-focused—approach was needed.
In the early 1990s, Extreme Programming (XP) reinforced the concept that tests should be written to describe how code should work, which was also the center of test-driven development (TDD) practices. The XP community then announced a practice that later would help shape what is today known as CI. They announced the use of automated processes to frequently integrate all code across developing teams, with the intention of delivering code that could be sent to production at any given time. This pra...

Table of contents