GitHub Actions Workshop
Master GitHub Actions with hands-on labs and exercises. Learn how to automate workflows, run tests, deploy applications, and more using GitHub's powerful automation platform. This repository has everything you need to get started with continuous integration and continuous deployment.
Project maintained by prasadhonrao
Hosted on GitHub Pages — Theme by mattgraham
⭐ If you like this repo, star it on GitHub — it helps a lot! ⭐
Overview •
Prerequisites •
Objectives •
Labs •
Resources •
License
Overview
Welcome to the GitHub Actions Workshop! This interactive workshop is designed to help you learn, practice, and master GitHub Actions—GitHub’s powerful automation platform for building, testing, and deploying code.
Throughout this workshop, you’ll gain hands-on experience in:
- Automating workflows to streamline your development process.
- Running tests to ensure code quality and reliability.
- Deploying applications efficiently to various environments.
- Leveraging GitHub Actions to integrate with third-party services and tools.
The workshop is structured around a series of labs, exercises, and real-world example workflows. Each lab is crafted to incrementally build your knowledge and skills, making it accessible whether you’re a beginner exploring automation for the first time or an experienced developer looking to optimize and scale your CI/CD pipelines.
By the end of this workshop, you’ll have the tools and confidence to harness the full potential of GitHub Actions, enabling you to automate complex processes, improve productivity, and accelerate software delivery.
Objectives
By the end of this workshop, you will learn how to:
-
Understand GitHub Actions Fundamentals:
- Grasp the basics of GitHub Actions and its architecture.
- Learn the YAML syntax used to define workflows.
- Understand workflow syntax and how to write workflows using IntelliSense.
-
Create and Customize Workflows:
- Set up GitHub Actions workflows from scratch.
- Trigger workflows using various events such as
push
, pull_request
, and workflow_dispatch
.
- Customize workflows with job and step attributes.
-
Use Contexts, Expressions, and Commands:
- Leverage contexts and expressions to create dynamic workflows.
- Learn GitHub Actions workflow commands to pass data between steps and manage workflow behavior.
-
Optimize Runner Options:
- Understand different hosting options for runners, including GitHub-hosted and self-hosted runners.
- Configure and optimize runners for better performance and cost efficiency.
-
Integrate Advanced Features:
- Use secrets and environment variables securely in workflows.
- Employ workflow templates and reusable workflows to standardize automation across repositories.
- Integrate GitHub Actions with external tools and services, such as Slack, AWS, and Jira.
-
Create Custom Actions:
- Develop custom JavaScript and Docker actions for specific needs.
- Publish and maintain custom actions on the GitHub Marketplace.
-
Implement and Manage CI/CD Pipelines:
- Build robust CI/CD pipelines for various technologies, including:
- ASP.NET Core Web Apps and Web APIs.
- Frontend frameworks like React.
- Python applications with virtual environments and dependency management.
- Automate the packaging and publishing of artifacts to GitHub Releases, NuGet, or PyPI.
- Automate deployment workflows to cloud providers, such as Azure, AWS, or Google Cloud.
-
Debug and Troubleshoot:
- Debug workflows using logging and the debug feature.
- Troubleshoot common issues like permission errors, job failures, and event mismatches.
-
Follow Best Practices:
- Adopt best practices for workflow design, security, and performance.
- Use linting tools and code reviews to maintain high-quality workflows.
-
Leverage Advanced Topics (Optional for Advanced Users):
- Use matrix builds to test across multiple configurations.
- Implement caching for dependencies and workflows.
- Explore composite actions to combine multiple steps into reusable units.
- Analyze and optimize workflow performance with metrics and analytics.
Prerequisites
Before you start the workshop, ensure you meet the following requirements:
Hardware and Connectivity
- Device: A laptop or desktop computer running Windows, macOS, or Linux.
- Internet Access: A stable internet connection is necessary to interact with GitHub and other cloud-based services during the workshop.
GitHub Setup
Development Environment
- Code Editor: Use any code editor of your choice. The recommended editor is Visual Studio Code for its GitHub integrations and YAML IntelliSense support.
- Git Installed: Ensure Git is installed and configured on your system. You can download Git from the official website.
Knowledge Prerequisites
- Git and GitHub Basics:
- Familiarity with concepts such as repositories, commits, branches, and pull requests.
- If you’re new to Git and GitHub, start with the Getting Started with GitHub Guide.
- Cloud Service Accounts (Optional, based on workshop goals):
- Accounts on services like Azure, AWS, or Google Cloud Platform may be needed if the workshop includes deployment exercises.
- Docker Hub Account (Optional):
- Required if you plan to build and push custom Docker actions to a container registry.
- GitHub CLI (Optional):
- Install the GitHub CLI for certain exercises involving automation with the CLI.
- Docker (Optional):
- Language Runtimes (Optional):
- Depending on the examples or pipelines used, install relevant runtimes like Node.js, Python, or .NET SDK.
Permissions and Access
- Repository Access:
- You will need permissions to create repositories and manage workflows in your GitHub account or organization.
- Secrets Management:
- Access to create and manage repository or organization secrets for use in workflows.
Labs
The core of this workshop is built around a set of labs that walk you through the process of automating your software development workflows using GitHub Actions.
To get started, navigate to the Workshop Labs page where you’ll find all the exercises, instructions, and challenges designed to help you understand and implement GitHub Actions step by step. Feel free to explore the labs and start working through them at your own pace!
Resources
Official GitHub Actions Resources
Learning and Tutorials
Guides
Debugging and Optimization
Security and Compliance
License
This project is licensed under the MIT License - see the LICENSE file for details.