Github Action Tutorial
On this Repository, I trying to figerout how to use Github Actions on big projects.
I watch vedio on udemy.com/Github Actions.
My strategy learing is:
learn basic only and start doing on a real project later everything will come 🥸
Target.
- automation of build process and deployment.
- automation of CI/CD.
- pull request automation.
- pull request review automation.
Path to the Repository
-
introduction 1.5 hours to complete ✅.
-
define the workflow.
name: simple
-
define Events to trigger the workflow.
on: push: branches: - master tags: - v1.0.0
or
on: [push]
-
define the sub-workflow under
jobs
jobs: build-projects:
-
select system to use. by
runs-on
attribute.jobs: build-projects: runs-on: ubuntu-latest
-
define the steps in the workflow and why we need use |.
jobs: build-projects: runs-on: ubuntu-latest steps: - name: echo string run: | # use pip for multiple lines. echo "Hello World 1" echo "Hello World 2"
-
how use needs attribute and when.
-
how we can use
uses
attribute to use other actions. -
pass paramters to actions we are use by use
with
.
-
-
Events, Schedules, External Events & Filters that can be used in a workflow.
You can check file .github/workflows/actions.yml for more information.
- How use on more advanced like type or specific branch.
- runing action under condition.
tags
andbranches
can be used to filter the action.paths
use for directory.
-
Environment Variables, Secrets, and encrypted & discrypted file. ✅
-
Strategies, Actions, and Jobs. ✅
- run action in parallel.
- run action difference version of os and package.
- use container.
-
createing a CI/CD workflow. ✅
-
createing Our Own Github Actions.