Week 9: Advanced CI/CD — GitHub Actions

Theme: Build production-grade CI/CD pipelines for containerized applications.

Learning Objectives

  1. Write multi-job GitHub Actions workflows with matrix builds
  2. Implement CI pipeline: lint → test → build → scan → push
  3. Implement CD pipeline: deploy to kind cluster
  4. Manage secrets securely with GitHub Environments and Actions Secrets

Reading Materials

Finger Exercises (choose 2)

  1. Create a GitHub Actions workflow that runs go test ./... on push to main. Add linting with golangci-lint.
  2. Add a container scan step with Trivy to the workflow. Fail on HIGH or CRITICAL vulnerabilities.
  3. Create a GitHub Environment called "staging" with required reviewers. Configure a deployment protection rule.

Project

Create a GitHub Actions CI/CD pipeline for the Phase 1 Go + Python app:

Add README badges: build status, test coverage (optional), Trivy scan result.

Time Budget

ActivityTime
Reading1.5 hrs
Finger exercises1.5 hrs
Project3 hrs
Total6 hrs