🔧 ProgrammierungI Tried This Rust Tool, and It Immediately Made Bash Modern(05.09.2026 um 11:25 Uhr)
🪟 Windows TippsA Clanker Pitted Fedora Against Windows 11. Fedora Won, Mostly(07.09.2026 um 18:33 Uhr)
🔧 ProgrammierungOmarchy Linux Quiz(10.09.2026 um 08:56 Uhr)
🪟 Windows TippsBottles' Founder Has Managed to Run Microsoft 365 on Linux(11.09.2026 um 13:59 Uhr)
🪟 Windows TippsChina Switching from Windows to Linux(24.08.2026 um 22:16 Uhr)
🔧 ProgrammierungI Tried This Rust Tool, and It Immediately Made Bash Modern(05.09.2026 um 11:25 Uhr)
🪟 Windows TippsA Clanker Pitted Fedora Against Windows 11. Fedora Won, Mostly(07.09.2026 um 18:33 Uhr)
🔧 ProgrammierungOmarchy Linux Quiz(10.09.2026 um 08:56 Uhr)
🪟 Windows TippsBottles' Founder Has Managed to Run Microsoft 365 on Linux(11.09.2026 um 13:59 Uhr)
🪟 Windows TippsChina Switching from Windows to Linux(24.08.2026 um 22:16 Uhr)

🔧 Programmierung 🕛 vor 3 Monaten 8 Min Lesezeit
0

Day 23 - Github Actions CI/CD Pipeline

↗ Quelle (dev.to)
🗣️ Stimme:
📑 Inhaltsübersicht

In Present Time software teams need fast, secure, and automated delivery.



Earlier, release flow looked like this:




CODE
Developer writes code

Manual build

Manual test

Manual deployment

Production issue






Today, GitHub Actions can automate this entire process directly from your GitHub repository.









🔗 Resources




  • ** Support the Journey on GitHub:
    If you're following along, consider starring and forking the repo:**









    What is GITHUB_TOKEN?



    GITHUB_TOKEN is an automatically generated token available in workflows.



    It can be used for GitHub API operations like:




    • Checkout

    • Comment on PR

    • Create releases

    • Push tags

    • Update repo content



    GitHub provides documentation explaining how GITHUB_TOKEN works for secure automation.



    Example:




    CODE
    permissions:
    contents: read
    packages: write












    What is OIDC in GitHub Actions?



    OIDC means OpenID Connect.



    It allows GitHub Actions to authenticate with cloud providers without storing long-lived access keys.



    Old approach:




    CODE
    Store AWS_ACCESS_KEY_ID
    Store AWS_SECRET_ACCESS_KEY






    Better approach:




    CODE
    GitHub Actions

    OIDC Token

    AWS IAM Role

    Temporary Credentials






    Benefits:




    • No long-lived cloud keys

    • Short-lived credentials

    • Better security

    • Easier rotation

    • Least privilege









    AWS OIDC Example






    CODE
    permissions:
    id-token: write
    contents: read









    CODE
    - name: Configure AWS Credentials using OIDC
    uses: aws-actions/configure-aws-credentials@v4
    with:
    role-to-assume: arn:aws:iam::123456789012:role/github-actions-deploy-role
    aws-region: ap-south-1












    What is a Webhook?



    A webhook is an event notification sent from GitHub to another system.



    Example:




    CODE
    GitHub Push Event

    Webhook

    External System






    Use cases:




    • Trigger Jenkins pipeline

    • Notify Slack

    • Trigger deployment platform

    • Send events to security tools









    Branch Rules and Rulesets



    Rules protect important branches.



    Example:




    CODE
    main branch






    should not allow direct push.



    Common rules:




    • Require pull request

    • Require approvals

    • Require status checks

    • Require signed commits

    • Restrict force pushes

    • Restrict deletions

    • Require linear history









    Why Rulesets Matter



    Rulesets enforce governance.



    Example:




    CODE
    Developer opens PR

    CI pipeline runs

    Tests pass

    Security scan passes

    Approval received

    Merge allowed






    Without rulesets, someone may directly push insecure code to production branch.









    Environment Protection Rules



    GitHub Actions can control deployments using environments, concurrency groups, and protection rules.



    Example:




    CODE
    environment:
    name: production






    You can configure:




    • Required reviewers

    • Wait timer

    • Deployment branches

    • Environment secrets



    Environment secrets and protection rules are available depending on repository type and plan.









    Full GitHub Actions CI/CD Pipeline Example



    This example does:




    CODE
    Checkout
    Install dependencies
    Run tests
    Run SAST
    Build Docker image
    Push to Amazon ECR
    Deploy to Kubernetes









    CODE
    name: GitHub Actions CI/CD Pipeline

    on:
    push:
    branches: [ main ]
    pull_request:
    branches: [ main ]

    permissions:
    contents: read
    id-token: write
    packages: write

    env:
    AWS_REGION: ap-south-1
    ECR_REPOSITORY: my-node-app
    IMAGE_TAG: ${{ github.sha }}

    jobs:
    ci:
    name: Build, Test and Scan
    runs-on: ubuntu-latest

    steps:
    - name: Checkout Code
    uses: actions/checkout@v4

    - name: Setup Node.js
    uses: actions/setup-node@v4
    with:
    node-version: 20

    - name: Install Dependencies
    run: npm ci

    - name: Run Unit Tests
    run: npm test

    - name: Run Semgrep SAST
    uses: semgrep/semgrep-action@v1
    with:
    config: auto

    - name: Build Docker Image
    run: |
    docker build -t $ECR_REPOSITORY:$IMAGE_TAG .

    deploy:
    name: Build Image and Deploy
    needs: ci
    runs-on: [self-hosted, linux, x64]
    if: github.ref == 'refs/heads/main'

    environment:
    name: production

    steps:
    - name: Checkout Code
    uses: actions/checkout@v4

    - name: Configure AWS Credentials using OIDC
    uses: aws-actions/configure-aws-credentials@v4
    with:
    role-to-assume: arn:aws:iam::123456789012:role/github-actions-deploy-role
    aws-region: ${{ env.AWS_REGION }}

    - name: Login to Amazon ECR
    run: |
    aws ecr get-login-password --region $AWS_REGION | \
    docker login --username AWS --password-stdin \
    123456789012.dkr.ecr.$AWS_REGION.amazonaws.com

    - name: Build and Push Docker Image
    run: |
    IMAGE_URI=123456789012.dkr.ecr.$AWS_REGION.amazonaws.com/$ECR_REPOSITORY:$IMAGE_TAG
    docker build -t $IMAGE_URI .
    docker push $IMAGE_URI
    echo "IMAGE_URI=$IMAGE_URI" >> $GITHUB_ENV

    - name: Deploy to Kubernetes
    run: |
    kubectl set image deployment/my-node-app \
    my-node-app=$IMAGE_URI \
    -n production

    kubectl rollout status deployment/my-node-app -n production












    Pipeline Flow Explained






    CODE
    Developer Pushes Code

    GitHub Actions Triggered

    CI Job Runs on GitHub Runner

    Tests + SAST

    Deploy Job Runs on Private Runner

    OIDC Authenticates to AWS

    Docker Image Pushed to ECR

    Kubernetes Deployment Updated












    Build Automation



    Build automation means converting source code into a deployable artifact.



    Examples:




    CODE
    Java → JAR/WAR
    Node.js → Bundle
    Dockerfile → Docker Image
    Helm Chart → Versioned Package






    Example:




    CODE
    - name: Build Docker Image
    run: docker build -t my-app:${{ github.sha }} .












    Deploy Automation



    Deploy automation means moving the artifact to the target environment.



    Examples:




    CODE
    ECR → EKS
    ACR → AKS
    Docker Hub → Kubernetes
    S3 → CloudFront
    Lambda ZIP → AWS Lambda






    Example:




    CODE
    - name: Deploy to Kubernetes
    run: kubectl apply -f k8s/












    GitOps Deployment Alternative



    In modern Kubernetes setups, GitHub Actions should often do only CI.



    CD should be handled by ArgoCD or Flux.



    Flow:




    CODE
    GitHub Actions

    Build Image

    Push to Registry

    Update GitOps Repo

    ArgoCD / Flux Deploys






    This avoids giving CI pipeline direct cluster-admin deployment access.









    GitOps Example Step






    CODE
    - name: Update GitOps Manifest
    run: |
    git config user.name "github-actions"
    git config user.email "[email protected]"

    sed -i "s|image: .*|image: $IMAGE_URI|g" k8s/deployment.yaml

    git add k8s/deployment.yaml
    git commit -m "Update image to $IMAGE_TAG"
    git push






    Then ArgoCD or Flux detects the manifest change and deploys it.









    Recommended Pre Production Pipeline



    Third Image









    GitHub Actions Best Practices



    Use:




    CODE
    OIDC instead of access keys
    Environment approvals for production
    Branch rulesets
    Private runners for private infra
    Least privilege permissions
    Pinned action versions
    Secrets only for sensitive values
    Variables for non-sensitive config
    Concurrency control
    Artifact retention policies












    Final Thoughts



    GitHub Actions is more than a CI/CD tool.



    It is an automation platform tightly integrated with GitHub.



    It can handle:




    • CI pipelines

    • Security scanning

    • Docker builds

    • Cloud authentication

    • Kubernetes deployment

    • Release automation

    • GitOps workflows



    For modern DevOps and DevSecOps teams, GitHub Actions becomes even more powerful when combined with:




    CODE
    Private runners
    OIDC
    Rulesets
    Environment approvals
    ArgoCD / Flux
    Security scanning






    A strong production pipeline is not only about deploying fast.



    It is about deploying:




    CODE
    Fast
    Securely
    Repeatably
    With control


    Vollständiger Original-Bericht
    Ausführliche Details, Code-Beispiele & Hersteller-Stellungnahme auf dev.to.
    ↗ Original-Artikel auf dev.to lesen
Wie bewertest du diesen Beitrag?
1 Klick Feedback
Teilen mit Netzwerk & Team:

Community-Analysen & Experten-Meinungen 0

Verfasse deine eigene Analyse, teile Workarounds oder diskutiere diesen Vorfall im Blog.
Noch keine Community-Analyse verfasst. Markiere einen Textabschnitt oder klicke oben auf Eigene Analyse verfassen“!
Community Pulse: Relevanz-Einschätzung
1 Klick Experten-Votum
🔴 Akute Relevanz 0%
🟡 In Evaluierung 0%
🟢 Keine Auswirkung 0%
Spannende Innovation 0%
Verwandte Story-Cluster & Quellen (Vektor-KI)
Port 8095 Engine
1 Quelle
Windows 10 und 11: Update zerschießt Druckfunktion und PDF-Export
1 Quelle
Nvidia killt Windows-10-Support - Bald keine Game-Ready-Treiber mehr
1 Quelle
Windows 10 weiter stabil - die Nutzerzahlen im August 2026
Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten Day 23 - Github Actions CI/CD Pipeline

Thematisch verwandte Begriffe: Github, Actions, CICD, Pipeline · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...