GitHub Actions: पहिली CI Pipeline
Read this guide in: English · मराठी · हिंदी
Why GitHub Actions हवे आहे? कारण developers आणि operations मध्ये problem आहे. Developers push करून म्हणतात “laptop वर test केले.” Operations — server side — Friday night शोधतो की shared checks कोणी चालवले नाहीत. पहिली CI pipeline प्रत्येक push वर तोच command चालवते — deploy चर्चा आधी दोन्ही पक्षांना pass/fail दिसते.
मित्रांनो, CI म्हणजे computer प्रत्येक वेळी तोच check चालवतो. आधी “test विसरलो” ची fight पहा.
थोडक्यात उत्तर
हे पाच पॉइंट्स लक्षात ठेवा:
- Developer — GitHub वर code push करतो.
- Operations — server-side person ज्याने फक्त checks पास झालेले builds पहावेत.
- Problem — “locally test केले” vs तुटलेले production; shared log नाही.
- GitHub Actions —
.github/workflows/YAML push वर चालते. - लक्षात ठेवा: push → runner checkout → steps green.
Language: English · मराठी · हिंदी
Problem? Suppose we are…
Suppose we are building Instagram (like updates)
Profile badge push tests skip करतो. Laptop ठीक. Production तुटते. Operations कडे CI log नाही — फक्त blame.
Suppose we are working at Netflix and we are giving updates
दिवसातून अनेक pushes. Manual “कृपया tests चालवा” scale होत नाही. प्रत्येक push वर तोच automated check हवा.
Suppose you are working in Infosys on a client project
Client operations म्हणतो: “Deploy आधी pipeline result दाखवा.” Green GitHub Actions run तो proof.
A git push starts a workflow from .yml: checkout on a runner, run steps, report pass or fail.
Teaching diagram of a first GitHub Actions ci.yml shape — no live GitHub login required to learn the idea.
Actions कसे उत्तर देते
.github/workflows/ci.yml:
name: ci
on:
push:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Show repo files
run: ls -la
- name: Simple check
run: test -f README.md
mkdir -p .github/workflows
git add .github/workflows/ci.yml
git commit -m "Add GitHub Actions CI workflow"
git push
GitHub → Actions → run पाहा. एकदा जाणूनबुजून fail करा, red log वाचा. Secrets → Settings मध्ये, repo मध्ये नाहीत.
Ravindra Bagale's Tip
पहिल्या दिवशी पाच deploy jobs paste करू नका. Checkout + एक साधा check. Green झाल्यावर build/test steps वाढवा. लक्षात ठेवा.
Learn it properly
समजलं का? Why Actions = “laptop test” vs server-side surprises थांबवा; Instagram / Netflix / Infosys “suppose”; push CI सुरू करतो.
Frequently asked questions
What is GitHub Actions?
GitHub’s built-in CI/CD: workflows run on GitHub-hosted (or self-hosted) runners when events happen.
What is a workflow?
A YAML file under .github/workflows that lists jobs and steps.
What is a runner?
The machine that executes your job (for example ubuntu-latest).
Is Actions free for public repos?
GitHub offers free minutes for public repositories; check current GitHub billing docs for private repos.
Do I need Docker in Actions on day one?
No. Start with checkout plus a simple shell or language setup action.
How do secrets work?
Store tokens in repo Settings → Secrets and reference them as ${{ secrets.NAME }} — never commit secrets.