---
tags: git, workflow
title: GitHub Actions Basic Concepts of CI/CD Pipeline
---
# GitHub Actions Basic Concepts of CI/CD Pipeline
Learn basics of GitHub CI/CD basics.
## name
- The name of your workflow. You can keep any name.
- name is optional property.
- 
## Events
- Every time something get pushed into master or you want to merge in to master you want to trigger your Jobs.
- **on** is required property

## Jobs
- **jobs** is Required filed
- Job Names could be anything you can give.
- Job basically groups a setup of actions that will be executed on the events mentioned on attribute.
- In below example I have a build job.

## Runs on
The servers that I mention that GitHub makes available where the workflow will run. It has 3 major Operating System.
- Ubuntu
- Windows
- macOS

You can run on multiple OS same workflow by using **matrix**

When You push your code notice 3 builds are running in 3 OS.

## Actions
- These are official pre-created repositories in actions list already available and defined with some versions.
- You don't need to install those actions or define.
- You can use actions in your CI/CD with "uses" attribute.
Check out all actions here: https://github.com/actions
In below example "setup-java@v1" Java version 1 will be installed and available in build machine. You can setup any environment like "setup-node@v1" will install node before you build.

### Choosing Actions to your CI/CD pipeline
Suppose I want to use Setup Node.js environment
Go to github marketplace and search for 'Setup Node.js environment'
https://github.com/marketplace/actions/setup-node-js-environment

```yaml=
- name: Setup Node.js environment
uses: actions/setup-node@v2.1.4
```
## Run
When you want to Run a Linux or windows command Line commands Use the "run" attribute.
