Lightweight demo automating Go builds through Docker and GitHub Actions with push-to-deploy via GCP Artifact Registry.
End-to-end CI/CD lab automating Go application builds through Docker and GitHub Actions, integrated with GCP Artifact Registry.
Built reproducible, production-style pipelines β from local build β tag β push β deploy β and fully documented four real debugging cycles (auth, build, tag, and workflow errors).
π¦ 100% reproducible builds Β· π Automated deploys via GitHub Actions Β· π§© Validated artifact storage in GCP
All commands should be run using bash.
This project demonstrates a complete CI/CD workflow:
docker ps -a.gcloud.Please note, time returned is in UTC. If running locally, will default to PDT, this can easily be changed to the timezone of your choice if desired in the code.
βββ .github/
βββ workflows/
βββ README.md
βββ go-dockerimage-pipeline.yaml
βββ Deployment
βββ Docs
βββ OPERATIONS_LOG.md
βββ Dockerfile
βββ README.md
βββ utc-time-date.go
| Layer | Tool | |ββ-|ββ| | Language | Go | | Containerization | Docker | | CI/CD | GitHub Actions | | Cloud | Google Cloud Platform (Artifact Registry) |
git clone https://github.com/justin-sniesak/go-docker-githubactions-pipeline.git
docker build -t utcTimeDate:latest .
docker run utcTimeDate
Verify output:
Hello, the date is 10/11/2025, and the time is 07:45 PM.
gcloud auth configure-docker
gcloud iam service-accounts create github-actions-sa \ --display-name="GitHub Actions Service Account"
gcloud projects add-iam-policy-binding <your-project> --member="serviceAccount:github-actions-sa@<your-project>.iam.gserviceaccount.com" --role="roles/artifactregistry.writer"
gcloud iam service-accounts keys create key.json \ --iam-account=github-actions-sa@<your-project>.iam.gserviceaccount.com
cat key.json
GitHub repo -> Settings -> Secrets and Variables -> New repository secret -> paste the ENTIRE JSON key file from the previous step and save
docker tag gotime:latest us-west1-docker.pkg.dev/<your-project>/<repo-name>/utcTimeDate:latest
docker push us-west1-docker.pkg.dev/<your-project>/<repo-name>/utcTimeDate:latest
Builds Docker image
Outputs current time and date in the pipeline log
Run docker run --rm utcTimeDate
docker run --rm utcTimeDate
shell: /usr/bin/bash -e {0}
Hello, the date is 10/12/2025, and the time is 06:10 AM.
Create, authenticate to and push Docker image to GCP Artifact Registry
CI/CD pipelines donβt have to be complex to be production-grade
Debugging is part of mastery β not failure
All screenshots included in repo.
Issue 1: GCP Authentication Failure
gcloud config set accountIssue 2: Docker Build Failure
Issue 3: Pipeline Failure
Issue 4: Tag and Push to GCP Failure
Justin Sniesak
Infrastructure Engineer | Cloud | Kubernetes | CI/CD | Go π Seattle, WA