Chaminda Chandrasekara and Pushpa Herath
Hands-on GitHub Actions
Implement CI/CD with GitHub Action Workflows for Your Applications
1st ed.
Logo of the publisher
Chaminda Chandrasekara
Dedigamuwa, Sri Lanka
Pushpa Herath
Hanguranketha, Sri Lanka
Any source code or other supplementary material referenced by the author in this book is available to readers on GitHub via the books product page, located at www.apress.com/978-1-4842-6463-8 . For more detailed information, please visit http://www.apress.com/source-code .
ISBN 978-1-4842-6463-8 e-ISBN 978-1-4842-6464-5
https://doi.org/10.1007/978-1-4842-6464-5
Chaminda Chandrasekara and Pushpa Herath 2021
This work is subject to copyright. All rights are solely and exclusively licensed by the Publisher, whether the whole or part of the material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation, broadcasting, reproduction on microfilms or in any other physical way, and transmission or information storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now known or hereafter developed.
The use of general descriptive names, registered names, trademarks, service marks, etc. in this publication does not imply, even in the absence of a specific statement, that such names are exempt from the relevant protective laws and regulations and therefore free for general use.
The publisher, the authors and the editors are safe to assume that the advice and information in this book are believed to be true and accurate at the date of publication. Neither the publisher nor the authors or the editors give a warranty, expressed or implied, with respect to the material contained herein or for any errors or omissions that may have been made. The publisher remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Distributed to the book trade worldwide by Springer Science+Business Media LLC, 1 New York Plaza, Suite 4600, New York, NY 10004. Phone 1-800-SPRINGER, fax (201) 348-4505, e-mail orders-ny@springer-sbm.com, or visit www.springeronline.com. Apress Media, LLC is a California LLC and the sole member (owner) is Springer Science + Business Media Finance Inc (SSBM Finance Inc). SSBM Finance Inc is a Delaware corporation.
May this book help all the developers who are starting to use GitHub Actions.
Introduction
GitHub is the most widely used source code repository provider. It is embraced by the open source community and by many software development companies. Today, source code is essentially required to have continuous integration and continuous delivery/deployments (CI/CD) to target environments because automation has become a norm in software development practices and includes the wide adoption of agility.
GitHub repositories can be integrated with third-party CI/CD integration tools, such as Jenkins or Azure DevOps. Since Microsofts acquisition, GitHub repos are now closely integrated with Azure DevOps. However, bringing all GitHub customers to use Azure DevOps is a tough ask, considering the wide adoption of GitHub by open source and non-Microsoft software development technology users.
GitHub Actions facilitate a state-of-the-art CI/CD workflow platform inside GitHub. The actions provide options to implement build and deployment workflows within GitHub. GitHub Actions enable pull request validation to enhance repository branch stability to the next level by assuring the code compilation state with each merge.
This hands-on book was written as a day-to-day reference for developers and Ops teams to build quality CI/CD workflows. The book offers in-depth lessons on implementation patterns, solutions for different technology builds, guidelines for implementing custom components as actions, and descriptions of the features available with GitHub Actions workflows to set up CI/CD for your repositories.
The book consists of sample code in each lesson to guide you through getting started with GitHub Actions workflows in your web or mobile applications, targeting any platform and any language. In addition to using GitHub-hosted machines (runners) to run the workflows, the book guides you through setting up your machines as runners for GitHub Actions. A detailed exploration of the available actions, syntax usage reference guides, and custom action implementation for your specific needs provide all the essentials you need to implement GitHub Actions workflows for your GitHub repositories.
Acknowledgments
We are thankful to all the mentors who have encouraged and helped us during our careers and who have provided us with so many opportunities to gain the maturity and the courage needed to write this book.
We would also like to thank our friends and colleagues who have helped and encouraged us in so many ways.
Last, but in no way least, we owe a huge debt to our families, not only because they have put up with late-night typing, research, and our permanent air of distraction, but also because they have had the grace to read what we have written. Our heartfelt gratitude is offered to them for helping us make this dream come true.
Table of Contents
About the Authors
Chaminda Chandrasekara
is a Microsoft Most Valuable Professional (MVP) for Visual Studio ALM and Scrum Alliance Certified ScrumMaster. He focuses on and believes in continuous improvement of the software development life cycle. He is the Cloud Development and DevOps Architect at eKriegers (Pvt) Ltd.
Chaminda is an active Microsoft Community Contributor (MCC) who is well recognized for his contributions in Microsoft forums, TechNet galleries, wikis, and Stack Overflow. He contributes extensions to Azure DevOps Server and Services (former VSTS/TFS) in the Microsoft Visual Studio Marketplace. He also contributes to other open source projects on GitHub. Chaminda has published six books with Apress.
Pushpa Herath
is a Microsoft Most Valuable Professional (MVP) working as a Senior DevOps Engineer at 99x. She has many years of experience in Azure DevOps Server and Services (formerly VSTS/TFS), the Azure cloud platform, and QA automation. She is an expert in DevOps, currently leading the Sri Lanka DevOps community.
Pushpa has in-depth knowledge of the Azure cloud platform tools in her community activities. She has published four books with Apress and speaks at community events on her Sri Lanka DevOps communitys YouTube channel. Pushpa blogs on technology at DevOps Adventure.
About the Technical Reviewer