What is GitHub Actions?
How
does
it work?
At the most basic level, GitHub Actions brings automation directly into the
software development lifecycle on GitHub via event-driven triggers. These
triggers are specified events that can range from creating a pull request to
building a new brand in a repository.
All GitHub Actions automations are handled via workflows, which are
YAML files placed under the .github/workflows directory in a repository
that define automated processes.
Choosing a Workflow for your Project:
1)
2)
An example workflow on GitHub Actions
This YAML File defines a GitHub
Actions workflow named CI
(Continuous Integration).
Trigger Events:
• On Push or Pull request to the
main branch
• Manual Trigger via
workflow_dispatch
Job: build
• Runs on: ubuntu-latest
• Checkout Code from the repo
using actions/checkout@v2
• Run a one-line script:
echo Hello, world!
• Run a multi- line script
• Run a local action
Is GitHub Actions a CI/CD tool?
GitHub Actions is a CI/CD tool for the GitHub flow. You can use it to
integrate and deploy code changes to a third-party cloud application
platform as well as test, track, and manage code changes. GitHub Actions
also supports third-party CI/CD tools, the container platform Docker, and
other automation platforms.
What can you do with GitHub
Actions? Popular use cases and
examples
• Build, test, and deploy within the GitHub
flow
• Automate repetitive tasks
• Manage users easily at scale
• Easily add preferred tools and services to
your project
• Quickly review & test code on GitHub
• Keep track of your projects
Additional resources
• Check out the following tutorials and resources to
learn more about GitHub Actions:
• Sample GitHub Actions Examples: GitHub Docs
• GitHub Actions Kubernetes Deployments: GitHub
Docs
• How to manage GitHub Actions permissions in your
organization: GitHub Docs