This repository is created for learning and practicing GitHub Actions and basic CI/CD concepts.
Today I learned:
- What CI/CD means
- What GitHub Actions is
- How workflows work
- How automation works in DevOps
- YAML workflow structure
- How GitHub automatically runs tasks
- Difference between manual and automatic workflow trigger
- Basic linting automation
This is part of my DevOps learning journey.
CI/CD is a modern DevOps practice used to automate software development processes.
Continuous Integration means developers regularly push code changes to GitHub, and automated workflows verify the code automatically.
- Detect coding issues early
- Improve code quality
- Reduce manual checking
- Run automated validation
- Keep project stable
Whenever code is pushed:
- GitHub detects the change
- Workflow starts automatically
- Lint/test commands run
- Result is shown in Actions tab
CD means automatically deploying the application after successful checks.
- Faster deployment
- Less manual work
- Reduce deployment mistakes
- Improve release process
GitHub Actions is GitHub’s built-in automation platform.
It helps automate:
- Testing
- Linting
- Building applications
- Running scripts
- Deployments
- CI/CD pipelines
GitHub Actions workflows must be stored inside:
.github/workflows/Example:
.github/workflows/hello.ymlA workflow is an automated process.
Example:
- Run Python file
- Run linter
- Build Docker image
- Deploy application
Events trigger workflows.
Common events:
- push
- pull_request
- workflow_dispatch
- schedule
Example:
on:
push:This means workflow starts whenever code is pushed.
Jobs are groups of tasks inside a workflow.
Example:
- Build Job
- Test Job
- Deploy Job
Runner is the virtual machine that executes workflow steps.
Example:
runs-on: ubuntu-latestGitHub provides:
- Ubuntu
- Windows
- macOS runners
Each job contains steps.
Example:
- Checkout code
- Install dependencies
- Run commands
name: Hello Workflow
on:
push:
jobs:
hello-job:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Print Message
run: echo "Hello Asma"name: Hello WorkflowThis is the workflow name visible in GitHub Actions tab.
on:
push:Defines when workflow should start.
jobs:Container that holds all jobs.
runs-on: ubuntu-latestDefines operating system used by GitHub runner.
steps:List of tasks to execute.
uses: actions/checkout@v4Downloads repository code into runner machine.
run: echo "Hello"Executes shell command.
on:
workflow_dispatch:This allows manual workflow execution.
Without this:
- workflow runs automatically only on push
With this:
- workflow can also be triggered manually from GitHub Actions tab
| push | workflow_dispatch |
|---|---|
| Automatic trigger | Manual trigger |
| Runs after code push | Runs when user clicks Run Workflow |
| Mostly used in CI | Mostly used for testing/manual execution |
Linting means checking code quality automatically.
Linting helps:
- Detect syntax mistakes
- Maintain coding standards
- Improve readability
- Find small bugs early
Example:
- name: Run Linter
run: flake8 .The purpose of lint.yml is automation.
Instead of manually checking code every time:
- GitHub automatically runs linting
- Checks code quality
- Shows success or failure
- Saves developer time
So yes, my understanding is:
- Workflow runs automatically after push
- No need to manually execute commands every time
- GitHub Actions automates the process
Developer Pushes Code
↓
GitHub Detects Change
↓
Workflow Starts
↓
Runner Machine Created
↓
Steps Execute
↓
Lint/Test Runs
↓
Success or Failure Status Shown
git status
git add .
git commit -m "Added GitHub Actions workflow"
git pushToday I learned:
- GitHub Actions basics
- CI/CD concepts
- Workflow automation
- YAML syntax
- Workflow triggers
- Jobs and steps
- Runner machines
- Linting process
- workflow_dispatch concept
- Automation in DevOps
Next I want to learn:
- Docker CI/CD pipeline
- Deploying applications automatically
- AWS deployment using GitHub Actions
- Secrets management
- Multi-job workflows
- Matrix strategy
- Kubernetes deployment automation
GitHub Actions is a powerful automation tool for DevOps and CI/CD.
This practice helped me understand:
- Automation concepts
- Workflow execution
- CI/CD pipeline basics
- YAML workflow structure
- GitHub automation process
This is an important step in my DevOps journey.