Github Runners
- Github Runners will have predefined size and pre-installed software Refer Here
- Refer Here for choosing a runner for a job
Writing a workflow yaml
- Workflow will have a name
- Workflow will run on trigger
- Workflow executes jobs
jobs:
<job-id>:
runs-on: <github-runner-image>
steps:
- name:
run
uses
- Whole github action is as shown below
name: ...
on: ...
jobs: ...
Exercise 1: Create a workflow
- This workflow should print “hello how are you” when a new change is pushed to main branch
- setup: Ensure vscode is installed and Github Actions extension is installed

- Now create a file in
.github/workflows/exercise1.yaml with name exercise 1
- Filling on:
You are an expert in Github actions
I'm a begineer
I'm understanding on how to use on section in github workflow
Give me an example wait form me understand then go to the next example
Give me most widely use on usages
Exercise 2:
- When the user pushes changes to main branch, show all the environmental variables in output
- Refer Here for the changes done
Exercise 3:
- when the user pushes the changes to dev branch then run ping google.com 4 times
-
Refer Here for changes
-
A step with run fails when the exit code of command is non zero
Exercise 4:
-
When the user creates a pull request to dev branch execute a new workflow and print thanks for pull request Refer Here
-
Exercise: Execute the github action once every day at
10:05 AM
Like this:
Like Loading...