- It is a CI/CD platform that allows you to automate your build, test, and deployment pipeline.
- It is useful to automate developer workflows.
- Github provides Linux, Windows and macOS virtual machines to run your workflows or you can host your own self-hosted runners in the data centre or cloud infrastructure.
- We don't need any third-party tool like Jenkins for Continuous integration.
- At a time, we can test and build our code in different Operating Systems.
- By using GitHub Actions you can run a workflow that tests and builds your code.
A workflow is a configurable automation process that will run one or more jobs. A YAML file defines workflow in the .github/workflows directory and runs whenever an event is triggered in the GitHub repository.
Ex: Whenever someone raises a pull request or pushes a commit to your GitHub repository, you want to ensure that new changes shouldn't break the existing code and pass all the tests and build.
- We can trigger a workflow by using events or by scheduling also.
- An event is a specific activity in a repository like opening a pull request, deleting a branch, pushing a commit to the repository, open a new issue. etc
- A job is a set of steps in a workflow that is executed on the same runner.
- Each step is either a shell script that is executed or an action to be run.
- Steps are dependent on each other so we can share data among that.
- By default jobs will run in parallel in a workflow.
In the above example, testing your code is one job and building your code is another job
- An action is a reusable unit of code that performs a specific task for a workflow.
- Actions are building blocks of GitHub workflows that automate tasks such as testing, building, and deployment.
- Ex: For any workflow pulling the latest code from the GitHub repository to the current virtual machine is necessary. So GitHub provides an action (actions/checkout@v2) that we can directly use in our workflow.
- A runner is a server that runs your workflows when they are triggered.
- Each runner can do a single job at a time.
- Each workflow runs in a fresh, newly provisioned virtual machine.
In the next article, we will see a detailed way to create and run a workflow with one real-time use case.
Co-Founder, BondingAI.io
7 个月See also this platform for GitHub actions and integration: https://mltblog.com/4cu6j7c
Frontend Developer | Immediate Joiner | React JS | Angular | Javascript | HTMl | CSS
8 个月Having everything under a single tool is incredibly exciting! It would be so helpful during PR reviews. Thank you Tirupathi Rao Bolla .
Software Engineer | Distributed systems , Java , AWS | React/Angular
8 个月This was incredibly helpful, exciting for real time use case