Skip to content

Commit 1cc302e

Browse files
committed
chore: Add GitHub Actions workflow for Docker image publishing
1 parent a78282a commit 1cc302e

File tree

2 files changed

+42
-1
lines changed

2 files changed

+42
-1
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Publish Docker image
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
push_to_registry:
9+
name: Push Docker image to Docker Hub
10+
runs-on: ubuntu-latest
11+
permissions:
12+
packages: write
13+
contents: read
14+
steps:
15+
- name: Check out the repo
16+
uses: actions/checkout@v4
17+
18+
- name: Log in to Docker Hub
19+
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
20+
with:
21+
username: ${{ secrets.DOCKER_USERNAME }}
22+
password: ${{ secrets.DOCKER_PASSWORD }}
23+
24+
- name: Extract metadata (tags, labels) for Docker
25+
id: meta
26+
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
27+
with:
28+
images: idylicaro/event-management
29+
30+
- name: Build and push Docker image
31+
id: push
32+
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671
33+
with:
34+
context: .
35+
file: ./Dockerfile
36+
target: production
37+
push: true
38+
tags: ${{ steps.meta.outputs.tags }}
39+
labels: ${{ steps.meta.outputs.labels }}

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ An API designed to manage events, supporting features like event creation, user
7676
- [x] Create a BaseResponse and Metadata about pagination.
7777
4. **Containerization and Deployment**
7878
- [x] Configure Docker for development and production environments.
79-
- [ ] Create Github action CI and CD rotines.
79+
- [x] Create CD rotine to first deploy.
8080
- [ ] Make a deployment.
8181
5. **Authentication** (Needs first deploy and a domain to simplify OAuth2 google configuration to test...)
8282
- [ ] Implement OAuth2 login with Google.
@@ -97,6 +97,8 @@ An API designed to manage events, supporting features like event creation, user
9797
2. **Testing**
9898
- [ ] Write unit and integration tests.
9999
- [ ] Perform load testing with k6 or Artillery.
100+
3. **CI/CD**
101+
- [ ] Create Github action CI.
100102
4. **Optional**
101103
- [ ] Create Kubernetes deployments and services.
102104
- [ ] Integrate Grafana and Prometheus for monitoring.

0 commit comments

Comments
 (0)