AZ-400: Designing and Implementing Microsoft DevOps Solutions

Work with Azure Repos and GitHub

Getting Started with GitHub

GitHub is the world’s largest open-source community platform, offering a comprehensive suite of tools to streamline development workflows, enhance security, and simplify project management from code to deployment.

Key Features Overview

FeatureBenefitsQuick Start Example
End-to-End AutomationAutomate CI/CD, linting, testing, and more with GitHub ActionsCreate a workflow in .github/workflows/ci.yml
Collaborative SecurityEnable vulnerability alerts, dependency and secret scanning via DependabotAdd a dependabot.yml to .github/
Effortless Code ReviewsUse pull requests, inline comments, protected branches, and status checksOpen a PR and assign reviewers
Unified WorkspaceHost code, docs, wikis, and project boards in a single repoEnable GitHub Pages under Settings → Pages
Real-Time SynchronizationSync repos, issues, and PRs across local/remote clonesgit clone https://github.com/user/repo.git
Team ManagementOrganize teams, assign granular permissions, and use CODEOWNERSAdd a CODEOWNERS file in .github/

1. Automate Workflows with GitHub Actions

GitHub Actions lets you define CI/CD pipelines as code. Automate testing, linting, container builds, and deployments—triggered on push, pull request, or schedule.

# .github/workflows/ci.yml
name: CI Pipeline

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

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - name: Set up Node.js
        uses: actions/setup-node@v3
        with:
          node-version: 16
      - name: Install dependencies
        run: npm install
      - name: Run tests
        run: npm test

Note

You can extend workflows with marketplace actions for Docker builds, security scans, and more.


2. Enhance Security Collaboratively

Protect your codebase by integrating automated vulnerability alerts, dependency scanning, and secret scanning. Dependabot helps you stay up to date with security patches.

# .github/dependabot.yml
version: 2
updates:
  - package-ecosystem: npm
    directory: "/"
    schedule:
      interval: daily

Warning

Always review automated PRs from Dependabot before merging to avoid unintended version bumps.


3. Effortless Code Reviews

Pull requests (PRs) are at the heart of collaborative development. Leverage inline comments, review approvals, and protected branch rules to enforce quality.

# Create a feature branch, commit, and push
git checkout -b feature/new-widget
# make changes...
git add .
git commit -m "Add new widget feature"
git push origin feature/new-widget
  1. Open a PR in the GitHub web interface.
  2. Assign reviewers or teams.
  3. Enforce required status checks under Settings → Branches.

4. Unified Workspace

Centralize code, documentation, and project planning:

  • Repositories for source code
  • Wikis for detailed guides
  • Project boards for Kanban-style tracking
  • GitHub Pages for hosting static sites
# Enable Pages
# 1. Navigate to your repo → Settings → Pages
# 2. Select branch and folder (e.g., `main` / `/docs`)

5. Real-Time Synchronization

Keep your local and remote repositories in sync. Work with issues and PRs seamlessly using the GitHub web interface or GitHub Desktop.

# Clone a repository
git clone https://github.com/your-org/your-repo.git

# Sync latest changes
cd your-repo
git pull origin main

6. Team Management

Organize contributors into teams, assign repository permissions, and enforce ownership rules:

  • Create teams under Organization → Teams
  • Define CODEOWNERS to auto-assign reviewers
# .github/CODEOWNERS
# All docs changes need review from the docs team
/docs/ @your-org/docs-team

Watch Video

Watch video content

Previous
Getting Started with Azure Repos