@@ -8,7 +8,7 @@ containerization, CI/CD, Kubernetes deployment, and Terraform infrastructure.
88- ** Language:** Go
99- ** Container:** Docker
1010- ** CI/CD:** GitHub Actions
11- - ** Registry:** Docker Hub
11+ - ** Registry:** GitHub Container Registry
1212- ** Orchestration:** Kubernetes
1313- ** IaC:** Terraform
1414
@@ -17,7 +17,8 @@ containerization, CI/CD, Kubernetes deployment, and Terraform infrastructure.
1717``` text
1818http-server-devops/
1919├── .github/
20- │ └── workflows/ # CI/CD pipeline
20+ │ └── workflows/
21+ │ └── docker-publish.yml
2122├── k8s/ # Kubernetes manifests
2223├── terraform/ # Terraform configuration
2324├── Dockerfile
@@ -31,7 +32,7 @@ http-server-devops/
3132
3233- [x] Task 1: HTTP Server
3334- [x] Task 2: Dockerize
34- - [ ] Task 3: CI/CD Pipeline
35+ - [x ] Task 3: CI/CD Pipeline
3536- [ ] Task 4: Kubernetes Deployment
3637- [ ] Task 5: Terraform Configuration
3738
@@ -94,3 +95,45 @@ docker run --rm -p 9090:9090 -e PORT=9090 http-server-devops:local
9495``` bash
9596curl http://localhost:9090/
9697```
98+
99+ ## CI/CD
100+
101+ This project uses GitHub Actions to run tests, build the Docker image, and publish it to GitHub Container Registry.
102+
103+ The workflow is defined in:
104+
105+ ``` text
106+ .github/workflows/docker-publish.yml
107+ ```
108+
109+ On pull requests to ` main ` , the pipeline:
110+
111+ - runs Go tests
112+ - builds the Docker image without publishing it
113+
114+ On pushes to ` main ` , the pipeline:
115+
116+ - runs Go tests
117+ - builds the Docker image
118+ - publishes the image to GitHub Container Registry
119+
120+ Published image:
121+
122+ ``` text
123+ ghcr.io/aldriondev/http-server-devops
124+ ```
125+
126+ Published tags:
127+
128+ - ` latest `
129+ - ghcr.io/aldriondev/http-server-devops: latest
130+
131+ The workflow uses the built-in GITHUB_TOKEN with following permissions:
132+
133+ ``` yaml
134+ permissions :
135+ contents : read
136+ packages : write
137+ ` ` `
138+
139+ No external Docker registry credentials are required.
0 commit comments