CI/CD Pipeline with GitHub Actions
Containerize a Go web server and automate builds with GitHub Actions.
Introduction
30 Second Summary
Every time you update code and manually test, build, and deploy it, you're doing work that a machine could handle in seconds. In the real world, DevOps engineers automate this entire process so that every code change is tested and packaged without human intervention.
In this project, you will build a Go web server, package it inside a Docker container, and create a GitHub Actions pipeline that automatically tests and builds your application on every push to GitHub.
What You'll Build
A containerized Go HTTP server with a fully automated CI/CD pipeline that triggers on every code push.
By the end of this project, you'll have:
- A Go web server with a health check endpoint, compiled into a minimal Docker container using a multi-stage build.
- A GitHub Actions workflow that automatically runs tests and builds your Docker image on every push.
- A public GitHub repository with visible green checkmarks proving your CI/CD pipeline works.
- Secret Mission: Add automated container vulnerability scanning with Trivy to fail the pipeline if critical security issues are found.
Are there any prerequisites?
You need a Windows 10 or 11 machine, a GitHub account, and VS Code installed. You do not need any prior experience with Go, Docker, or CI/CD pipelines.
Install Git, Go, and Docker Desktop
Every CI/CD pipeline needs three things: a way to track code changes, a language to write the application in, and a way to package it for deployment.
In this step, you will install the three tools that make this possible: Git for version control, Go for building your web server, and Docker Desktop for containerizing it.
In this step, get ready to:
- Install and configure Git for version control.
- Install Go to write and test your web server.
- Install Docker Desktop to containerize your application.
Install and configure Git
Git tracks every change you make to your code. It also lets you push your project to GitHub, where your CI/CD pipeline will run automatically.
- Press the Windows key to open your search bar.
- Type PowerShell and press Enter to open it.
Why PowerShell?
PowerShell is Windows' modern terminal. You will use it for every command in this project. Keep it open throughout.
- Install Git by running this command:
winget install --id Git.Git -e --source winget
What does this command do?
This uses winget, the Windows Package Manager, to download and install Git. The --id Git.Git flag specifies the exact package. The -e flag forces an exact match so you get the right one.
- Close your PowerShell window completely, then reopen it using the same search method above.
- Verify the installation by running:
git --version
✔️ I see a version number
You should see something like git version 2.54.0.windows.1. Git is ready to go.
ⓧ Command not found
If PowerShell does not recognize git, the winget command may not be available on your machine. Try these steps:
- Open the Microsoft Store app.
- Search for App Installer and click Get or Update.
- Close and reopen PowerShell, then try the winget install command again.
- After it completes, close and reopen PowerShell one more time and run git --version.
Now configure Git with your identity. GitHub uses this to label your commits.
- Set your Git username and email by running these commands:
git config --global user.name "[[YOUR_NAME="Your Name"]]"
git config --global user.email "[[YOUR_EMAIL="your@email.com"]]"
What does this do?
These commands tell Git who you are. Every commit you make will be tagged with this name and email. Use the same email you used for your GitHub account.
Git still not recognized?
Make sure you closed and reopened PowerShell after the install completed. Windows needs a fresh terminal session to pick up new PATH entries.
help me troubleshoot Git not being recognized in PowerShell after installing with winget
Install Go
Go is the programming language you will use to write your web server. Its compiler produces a single binary with zero dependencies, which makes it ideal for Docker containers.
- Open your browser and go to the Go downloads page:
- Download the Windows installer file named go1.26.4.windows-amd64.msi.
- Run the downloaded .msi file and follow the prompts to install. Accept the default settings.
- Close your PowerShell window completely, then reopen it.
- Verify the installation by running:
go version
✔️ I see go1.26 or higher
You should see go version go1.26.4 windows/amd64 or similar. Go is ready.
ⓧ I see an older version
This project requires Go 1.26 or higher. If you see an older version, you need to upgrade.
- Open Settings, then Apps, then Installed apps.
- Find Go Programming Language and click Uninstall.
- Download and run the go1.26.4.windows-amd64.msi installer from https://go.dev/dl/.
- Close and reopen PowerShell, then run go version again.
ⓧ Command not found
If PowerShell does not recognize go, the installer may not have updated your PATH correctly.
- Make sure you closed and reopened PowerShell after running the installer. Windows needs a fresh session to pick up PATH changes.
- If it still does not work, download and run the go1.26.4.windows-amd64.msi installer again from https://go.dev/dl/. The MSI installer automatically adds Go to your system PATH.
- Close and reopen PowerShell one more time, then run go version.
Still having trouble with Go?
The Go MSI installer adds C:\Program Files\Go\bin to your system PATH. If you have an old Go version on your machine that shadows this, uninstall it first via Settings > Apps > Installed apps, then reinstall.
help me get Go 1.26 working on Windows
Install Docker Desktop
Docker Desktop lets you build and run containers on your Windows machine. Your Go application will run inside a Docker container, just like it would in production.
- Open your browser and go to the Docker Desktop install page:
https://docs.docker.com/desktop/setup/install/windows-install/
- Click the Docker Desktop for Windows - x86_64 download button.
- Run the downloaded installer.
- When prompted, make sure Use WSL 2 instead of Hyper-V is selected. Click Ok to continue.
What is WSL 2?
WSL 2 (Windows Subsystem for Linux 2) is a lightweight Linux layer built into Windows. Docker uses it to run containers efficiently. Enabling WSL 2 for the first time is a one-time operation that may require admin privileges and a restart.
- If the installer asks you to enable WSL 2, click Yes and allow it. Your computer may restart.
- After the installer finishes (and any restart completes), open Docker Desktop from the Start menu.
- Wait for Docker Desktop to finish starting. You will see a green status indicator when it is ready.
- Switch back to PowerShell and verify Docker by running:
docker --version
✔️ I see a version number
You should see something like Docker version 28.x.x. Docker is ready.
ⓧ Command not found
If PowerShell does not recognize docker, Docker Desktop may not be running or may not have finished installing.
- Make sure Docker Desktop is open and shows a green status indicator in the bottom-left corner.
- Close and reopen PowerShell to pick up the new PATH entries that Docker Desktop added.
- If the installer asked for a restart and you skipped it, restart your computer now, then open Docker Desktop and try again.
Docker Desktop won't start?
Docker Desktop requires WSL 2 version 2.1.5 or later. If you see an error about WSL, open PowerShell as Administrator and run wsl --update. Then restart Docker Desktop.
Your machine also needs hardware virtualization enabled in BIOS and at least 8GB of RAM.
help me get Docker Desktop running on Windows with WSL 2
Your development environment is fully set up. Next, you will write the Go web server that your pipeline will test and build automatically.
Create the Go Web Server
Your tools are installed and ready to go. Now it's time to write the application that your pipeline will build and deliver.
Every CI/CD pipeline needs something to build. In this step, you'll create a simple Go web server with a health check endpoint, write an automated test for it, and confirm everything works locally before containerizing it later.
In this step, get ready to:
- Create a Go project with an HTTP server and health endpoint.
- Write an automated test for the health endpoint.
- Run the tests and confirm the server works in your browser.
Set up the project directory and write the server
Every Go project starts with a module. A module is Go's way of tracking your project's name and dependencies.
- Move to your Desktop by running this command:
cd ~/Desktop
- Create your project folder and move into it by running these commands:
mkdir devops-pipeline
cd devops-pipeline
- Initialize a Go module by running this command:
go mod init devops-pipeline
What does this command do?
go mod init devops-pipeline creates a go.mod file that declares your project's module name. Go uses this file to manage dependencies and identify your package.
- Open the project in VS Code by running:
code .
VS Code opens with your devops-pipeline folder loaded in the Explorer sidebar.
- In the Explorer sidebar, hover over the DEVOPS-PIPELINE heading and click the New File icon (a page with a plus sign).
- Type main.go as the file name and press Enter.
- Paste the following code into main.go:
package main
import (
"encoding/json"
"fmt"
"log"
"net/http"
)
func main() {
http.HandleFunc("/", homeHandler)
http.HandleFunc("/health", healthHandler)
fmt.Println("Server starting on port 8080...")
log.Fatal(http.ListenAndServe(":8080", nil))
}
func homeHandler(w http.ResponseWriter, r *http.Request) {
fmt.Fprintf(w, "Hello, DevOps!")
}
func healthHandler(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "application/json")
json.NewEncoder(w).Encode(map[string]string{"status": "healthy"})
}
What does this code do?
This file defines a web server with two endpoints:
- / responds with the text Hello, DevOps! to confirm the server is reachable.
- /health returns a JSON object {"status":"healthy"} that monitoring tools can check automatically.
- log.Fatal(http.ListenAndServe(":8080", nil)) starts the server on port 8080 and stops the program if the server crashes.
- Save main.go with Ctrl+S.
Seeing red squiggly lines in VS Code?
If VS Code highlights import errors, it may not have detected your Go installation yet. Close and reopen VS Code with code . from your terminal. VS Code's Go extension needs the project folder open to resolve imports.
help me fix red squiggly lines in my Go file in VS Code
✔️ Awesome, I've got everything!
Great. Make sure you've saved main.go before moving on.
ⓧ I'd like to double check the full code
Here's the complete main.go for comparison:
package main
import (
"encoding/json"
"fmt"
"log"
"net/http"
)
func main() {
http.HandleFunc("/", homeHandler)
http.HandleFunc("/health", healthHandler)
fmt.Println("Server starting on port 8080...")
log.Fatal(http.ListenAndServe(":8080", nil))
}
func homeHandler(w http.ResponseWriter, r *http.Request) {
fmt.Fprintf(w, "Hello, DevOps!")
}
func healthHandler(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "application/json")
json.NewEncoder(w).Encode(map[string]string{"status": "healthy"})
}
Write the test file
Automated tests let a CI/CD pipeline decide whether your code is safe to deploy. You'll write a test that verifies the health endpoint returns a 200 OK status code.
- In the Explorer sidebar, click the New File icon again.
- Name the file main_test.go and press Enter.
- Paste the following code into main_test.go:
package main
import (
"net/http"
"net/http/httptest"
"testing"
)
func TestHealthHandler(t *testing.T) {
req, err := http.NewRequest("GET", "/health", nil)
if err != nil {
t.Fatal(err)
}
rr := httptest.NewRecorder()
handler := http.HandlerFunc(healthHandler)
handler.ServeHTTP(rr, req)
if status := rr.Code; status != http.StatusOK {
t.Errorf("handler returned wrong status code: got %v want %v", status, http.StatusOK)
}
}
What does this test do?
This test simulates an HTTP GET request to /health without starting a real server.
- httptest.NewRecorder() creates a fake response writer that captures what the handler sends back.
- handler.ServeHTTP(rr, req) calls your healthHandler directly with the fake request.
- The final check confirms the response status code is 200 (http.StatusOK).
- Save main_test.go with Ctrl+S.
VS Code showing errors in the test file?
Make sure main_test.go is in the same folder as main.go. Both files declare package main and must be in the project root (devops-pipeline/).
help me fix errors in my Go test file
✔️ Awesome, I've got everything!
Great. Make sure you've saved main_test.go before moving on.
ⓧ I'd like to double check the full code
Here's the complete main_test.go for comparison:
package main
import (
"net/http"
"net/http/httptest"
"testing"
)
func TestHealthHandler(t *testing.T) {
req, err := http.NewRequest("GET", "/health", nil)
if err != nil {
t.Fatal(err)
}
rr := httptest.NewRecorder()
handler := http.HandlerFunc(healthHandler)
handler.ServeHTTP(rr, req)
if status := rr.Code; status != http.StatusOK {
t.Errorf("handler returned wrong status code: got %v want %v", status, http.StatusOK)
}
}
Run the tests and start the server
Your code is written. Time to prove it works by running the automated test and then starting the server to see the health endpoint in action.
- Open the integrated terminal in VS Code with Ctrl+` (backtick key, usually above Tab).
- Run your tests by entering this command:
go test ./...
You should see output containing ok and PASS confirming the test passed.
Test failing or command not found?
- If you see go: command not found, close and reopen VS Code's terminal. The terminal may not have picked up Go's PATH from your earlier installation.
- If the test fails, check that main.go and main_test.go both say package main on line 1 and are in the same folder.
help me fix my failing Go test
- Start the server by running:
go run main.go
You should see Server starting on port 8080... in the terminal.
- Open your browser and visit http://localhost:8080/health.
You should see the JSON response {"status":"healthy"} displayed in your browser.
- Return to VS Code's terminal and press Ctrl+C to stop the server.
Browser showing an error or blank page?
- Make sure you typed the URL exactly as http://localhost:8080/health with no trailing slash.
- Confirm the terminal still shows Server starting on port 8080... and has not printed an error. If it exited, run go run main.go again.
- If you see a "port already in use" error, another process is using port 8080. Close other terminal windows that might be running the server.
help me get my Go server running on localhost:8080
Your Go server is tested and running. Next up, you'll package it into a Docker container so it can run anywhere, not just on your machine.
Containerize the Application with Docker
Your Go server passes its tests and responds on localhost:8080. That works on your machine, but what about a teammate's laptop or a cloud server?
Docker solves this by packaging your application into a container that runs identically everywhere. In this step, you'll write a multi-stage Dockerfile that compiles your Go binary and wraps it in a minimal image.
In this step, get ready to:
- Create a multi-stage Dockerfile for the Go server.
- Build and run the Docker container locally.
- Verify the health endpoint responds from inside the container.
Create the multi-stage Dockerfile
A multi-stage build uses two separate FROM instructions. The first stage pulls a full Go image and compiles your code. The second stage starts from an empty base image and copies only the compiled binary.
- In VS Code, create a new file called Dockerfile in the root of your devops-pipeline folder.
- Make sure the filename is exactly Dockerfile with a capital D and no file extension.
- Paste the following code into Dockerfile:
FROM golang:1.26 AS builder
WORKDIR /app
COPY go.mod ./
COPY *.go ./
RUN CGO_ENABLED=0 GOOS=linux go build -o /server .
FROM scratch
COPY --from=builder /server /server
EXPOSE 8080
ENTRYPOINT ["/server"]
What does this code do?
The first stage (FROM golang:1.26 AS builder) pulls the full Go toolchain image, copies your source files, and compiles a static Linux binary. The CGO_ENABLED=0 flag disables C dependencies so the binary can run without any system libraries.
The second stage (FROM scratch) starts from a completely empty image. It copies only the compiled binary from the builder stage. The final image contains nothing except your server executable.
This produces a tiny, secure container with no shell, no package manager, and no unnecessary tools for attackers to exploit.
- Save Dockerfile.
Seeing a red underline in VS Code?
VS Code might not recognize Dockerfile syntax by default. You can ignore any highlighting warnings. The file will still work correctly with Docker.
Make sure the file is named exactly Dockerfile (no .txt extension). Windows sometimes adds a hidden extension.
help me fix my Dockerfile
✔️ Awesome, I've got everything!
Great. Double check you've saved your file before moving on.
ⓧ I'd like to double check the full code
Here is the complete Dockerfile:
FROM golang:1.26 AS builder
WORKDIR /app
COPY go.mod ./
COPY *.go ./
RUN CGO_ENABLED=0 GOOS=linux go build -o /server .
FROM scratch
COPY --from=builder /server /server
EXPOSE 8080
ENTRYPOINT ["/server"]
Build and run the Docker container
With the Dockerfile saved, you can now build an image and start a container from it.
- Build your Docker image by running this command:
docker build -t devops-pipeline .
What does this command do?
docker build reads the Dockerfile in the current directory (the . at the end) and executes each instruction. The -t devops-pipeline flag tags (names) the resulting image so you can reference it later.
Docker runs both stages automatically. The builder stage downloads the Go toolchain, compiles your code, then the final stage copies the binary into the empty scratch image.
- Verify the image was created and check its size by running:
docker images devops-pipeline
You should see devops-pipeline listed with a SIZE value under 15MB. That tiny footprint comes from using the scratch base image.
Build failed or image not showing?
Make sure Docker Desktop is running. Check for the Docker icon in your system tray near the clock. If it says "Docker Desktop starting," wait until it shows "Docker Desktop is running."
Confirm Docker Desktop is set to use Linux containers (the default with WSL 2 backend). Right-click the Docker icon in your system tray. If you see "Switch to Windows containers," you are already on Linux containers and everything is correct.
Make sure you are running the command from inside the devops-pipeline folder where your Dockerfile lives.
help me fix my Docker build error
- Start a container from your image by running:
docker run -p 8080:8080 devops-pipeline
Your terminal displays Server starting on port 8080... and the cursor stops. The container is running in the foreground.
- Open your browser and visit http://localhost:8080/health. You should see {"status":"healthy"} in the response.
- Return to your terminal and press Ctrl+C to stop the container.
Health endpoint not responding?
If the browser shows "This site can't be reached," make sure the terminal is still displaying Server starting on port 8080... without any error messages. If the container exited immediately, the build may have failed silently.
Check that nothing else is using port 8080. If you ran go run main.go earlier and forgot to stop it, that process is blocking the port. Stop it first, then retry.
help me get my Docker container responding on localhost
Why use a scratch image instead of a full OS?
A typical Go Docker image built on golang:1.26 would be over 1GB because it includes the entire Go toolchain and a Linux distribution. Your scratch-based image is under 15MB because it contains nothing except your compiled binary.
This matters for security too. With no shell, no package manager, and no OS utilities in the image, there are far fewer things an attacker could exploit if they compromised the container.
Your application now runs inside a portable container. Next up, you'll push this to GitHub and create a CI/CD pipeline that builds and tests your container automatically on every push.
Create the CI/CD Pipeline with GitHub Actions
You have a working Go app and a Docker container that runs it locally. The next step is to automate the process so that every time you push code, your tests run and your container builds automatically.
This is what a CI/CD pipeline does. In this step, you will push your project to GitHub and create a GitHub Actions workflow that tests and builds your container on every push.
In this step, get ready to:
- Push your project to a public GitHub repository.
- Create a GitHub Actions workflow file that runs tests and builds the Docker image.
- Watch the pipeline execute automatically on GitHub.
Initialize Git and push to GitHub
Before GitHub Actions can run your pipeline, your code needs to live in a GitHub repository. You will initialize a local Git repository, commit your project files, and push everything to a new public repository on GitHub.
- Initialize a Git repository in your project folder by running this command:
git init
- Stage all your project files by running:
git add .
- Create your first commit by running:
git commit -m "Initial commit: Go app with Dockerfile"
What do these commands do?
- `git init` creates a new Git repository inside your `devops-pipeline` folder.
- `git add .` stages every file in the folder for your first commit.
- `git commit` saves a snapshot of those files with a descriptive message.
Now you need a remote repository on GitHub to push your code to.
- Open your browser and go to github.com.
- In the upper-right corner of any page, click the + icon, then click New repository.
- In the Repository name field, type devops-pipeline.
- Select Public for the repository visibility.
- Leave all other options unchecked (do not add a README, .gitignore, or license).
- Click Create repository.
Why leave it empty?
You already have files locally. If GitHub creates a README for you, it introduces a conflict when you try to push. Starting with an empty remote keeps things clean.
GitHub shows setup instructions after you create the repository. You will use the commands for pushing an existing repository.
- Connect your local repository to GitHub and push your code by running these commands:
git remote add origin [[GITHUB_REPO_URL="https://github.com/your-username/devops-pipeline.git"]]
git branch -M main
git push -u origin main
What do these commands do?
- `git remote add origin` links your local repo to the GitHub URL.
- `git branch -M main` renames your default branch to `main`.
- `git push -u origin main` uploads all your committed files to GitHub.
GitHub may ask for authentication
If prompted, sign in with your GitHub credentials. On Windows, a browser window may open for you to authorize Git. Follow the prompts to complete authentication.
- Refresh your repository page on GitHub. You should see main.go, main_test.go, go.mod, and Dockerfile listed in the file tree.
Don't see your files on GitHub?
- Make sure the remote URL matches your repository exactly. Run `git remote -v` to check.
- If you get a permission error, confirm you are signed in to the correct GitHub account.
- If you accidentally initialized the repo with a README, delete the repository on GitHub, recreate it empty, and push again.
Why can't I push to GitHub?
Create the GitHub Actions workflow file
GitHub Actions looks for workflow files inside a `.github/workflows` directory. Each YAML file in that folder defines a pipeline that GitHub runs automatically based on triggers you specify.
- Create the workflow directory by running this command:
New-Item -ItemType Directory -Path ".github\workflows" -Force
- Confirm the directory exists by running:
ls .github\workflows
You should see the empty `workflows` directory listed without errors.
- In VS Code, expand the .github folder in the Explorer sidebar, then expand workflows.
- Right-click the workflows folder and select New File.
- Name the file ci.yml and press Enter.
Hidden folders in VS Code
If you do not see the .github folder in the Explorer, click the ... menu at the top of the Explorer panel, then ensure hidden files are visible. On Windows, folders starting with a dot are not hidden by default, so you should see it immediately.
- Paste the following workflow configuration into ci.yml:
name: CI Pipeline
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.26'
- name: Run tests
run: go test ./...
- name: Build Docker image
run: docker build -t devops-pipeline .
What does this workflow do?
- `on: push` and `on: pull_request` tell GitHub to run this pipeline whenever code is pushed to `main` or a pull request targets `main`.
- `runs-on: ubuntu-latest` means the pipeline runs on a fresh Linux virtual machine hosted by GitHub.
- `actions/checkout@v4` pulls your repository code into that virtual machine.
- `actions/setup-go@v5` installs Go `1.26` on the runner so your code can compile.
- `go test ./...` runs all the tests in your project.
- `docker build -t devops-pipeline .` builds your Docker image exactly the same way you did locally.
Why GitHub Actions over Jenkins?
GitHub Actions is free for public repositories with unlimited minutes. It requires zero infrastructure setup because GitHub hosts the runners for you. Jenkins would require setting up and maintaining your own server.
- Save ci.yml by pressing Ctrl+S.
✔️ Awesome, I've got everything!
Great. Make sure you have saved the file before moving on.
ⓧ I'd like to double check the full code
Here is the complete .github/workflows/ci.yml file:
name: CI Pipeline
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.26'
- name: Run tests
run: go test ./...
- name: Build Docker image
run: docker build -t devops-pipeline .
Push the workflow and watch the pipeline run
The workflow file only takes effect once it reaches GitHub. You need to commit and push it so GitHub Actions picks it up and runs the pipeline.
- Stage, commit, and push the workflow file by running these commands:
git add .github/workflows/ci.yml
git commit -m "Add CI pipeline workflow"
git push
What happens after you push?
GitHub detects the new workflow file in `.github/workflows/` and immediately starts a pipeline run. The runner checks out your code, installs Go, runs your tests, and builds the Docker image. All of this happens on GitHub's servers, not on your machine.
- Open your repository on GitHub in your browser.
- Click the Actions tab near the top of the page.
- You should see a workflow run named Add CI pipeline workflow (matching your commit message).
- Click on the workflow run to see the details.
- Click the build job to expand the step-by-step logs.
You should see green checkmarks next to each step: checkout, Go setup, tests passing, and Docker image building successfully.
Pipeline failed or not showing up?
- If the Actions tab is empty, confirm that your push succeeded by checking your repo's file list for `.github/workflows/ci.yml`.
- If the workflow fails at the test step, open the logs and check for a Go compilation error. Make sure your local `go test ./...` passes before pushing.
- If the Docker build step fails, verify your `Dockerfile` is committed and present in the repository root.
Why is my GitHub Actions pipeline failing?
Your CI/CD pipeline is live. Every time you push code to `main`, GitHub will automatically test and build your container. Next up, you will take this further by adding security scanning to catch vulnerabilities before they reach production.
Secret mission
Add Container Security Scanning with Trivy
Your pipeline builds and tests automatically. But what if your container image ships with a known security vulnerability? In this secret mission, you'll add automated vulnerability scanning that blocks unsafe images from ever reaching production.
Clean Up Your Resources
Clean Up Your Resources
This project runs entirely locally and uses GitHub Actions on a public repository, so there are no ongoing costs. Decide whether to keep your resources running, pause them to come back later, or delete them entirely.
Resources you used:
- Local project folder (devops-pipeline/ on your Desktop).
- Docker image (devops-pipeline).
- GitHub repository (public, with GitHub Actions workflow).
- Docker Desktop (installed application).
- Git (installed via winget).
- Go (installed via MSI).
Keep everything running
No action needed. Choose this if you are still actively building on this project or plan to use Git, Go, and Docker for future projects.
- Your devops-pipeline/ folder remains on your Desktop.
- Docker Desktop continues running in the background.
- Your GitHub repository stays public with visible pipeline runs.
- Git, Go, and Docker Desktop remain installed for other projects.
Pause - I'll come back to this later
Shut down running processes to free up system memory. Your files and installations stay intact so you can resume anytime.
- Quit Docker Desktop by right-clicking the Docker whale icon in the system tray and selecting Quit Docker Desktop.
- Your project folder, GitHub repository, and installed tools all remain in place.
- When you are ready to resume, open Docker Desktop from the Start menu and it will pick up where you left off.
Delete - I don't want to use this again
Remove all project resources and installed tools. Follow each step below to clean up completely.
- Remove the Docker image by running this in PowerShell:
- Delete your local project folder by running:
- Delete your GitHub repository by navigating to your repository page, clicking Settings, scrolling down to the Danger Zone section, and clicking Delete this repository. Confirm the deletion by typing your repository name when prompted.
- Uninstall Docker Desktop by opening Settings from the Windows Start menu, then selecting Apps, then Apps & features. Find Docker Desktop in the list and click Uninstall.
- Uninstall Git by running:
- Uninstall Go by opening Settings from the Windows Start menu, then selecting Apps, then Apps & features. Find Go Programming Language in the list and click Uninstall.
docker rmi devops-pipeline
Remove-Item -Recurse -Force ~/Desktop/devops-pipeline
winget uninstall --id Git.Git
What about my GitHub account?
Your GitHub account is yours to keep. This project did not create a new account, so there is nothing to delete there. The repository deletion above only removes this specific repo.
Nice Work!
Nice Work!
Nice work! You just built a fully automated CI/CD pipeline that tests and containerizes a Go web server every time you push code to GitHub.
You've learned how to:
- Build a Go web server with a health check endpoint and unit tests.
- Write a multi-stage Dockerfile that compiles a Go binary and packages it into a minimal scratch container image.
- Create a GitHub Actions CI/CD pipeline that automatically runs tests and builds a Docker image on every push to main.
- (Secret Mission) Added Trivy container security scanning to automatically fail the pipeline when critical vulnerabilities are detected.
Ready to quiz yourself?