Skip to content

Commit 09a15fd

Browse files
committed
feat: update image tag to latest, vs SHA
1 parent bb61109 commit 09a15fd

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

.github/workflows/docker-build.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build and Deploy to AWS
1+
name: Build and Deploy to ECR
22

33
on:
44
push:
@@ -32,11 +32,11 @@ jobs:
3232
env:
3333
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
3434
ECR_REPOSITORY: devcolor00-school
35-
IMAGE_TAG: ${{ github.sha }}
35+
IMAGE_TAG: dev
3636
run: |
37-
docker build -f docker/Dockerfile -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG .
37+
docker build -f docker/Dockerfile -t $ECR_REGISTRY/$ECR_REPOSITORY:dev .
3838
docker build -f docker/Dockerfile -t $ECR_REGISTRY/$ECR_REPOSITORY:latest .
39-
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
39+
docker push $ECR_REGISTRY/$ECR_REPOSITORY:dev
4040
docker push $ECR_REGISTRY/$ECR_REPOSITORY:latest
4141
4242
# - name: Deploy to App Runner

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,12 +135,12 @@ Standard HTTP status codes are used to indicate success or failure:
135135

136136
1. **Build the Docker image:**
137137
```bash
138-
docker build -f docker/Dockerfile -t devcolor-backend:prod .
138+
docker build -f docker/Dockerfile -t devcolor-backend:dev .
139139
```
140140

141141
2. **Run the container:**
142142
```bash
143-
docker run -p 8000:8000 --env-file .env devcolor-backend:prod
143+
docker run -p 8000:8000 --env-file .env devcolor-backend:dev
144144
```
145145

146146
### Using Docker Compose
@@ -217,7 +217,7 @@ The workflow runs automatically on:
217217
- Pushes to `main` or `develop` branches
218218
- Pull requests to the `main` branch
219219

220-
The Docker image will be tagged as `devcolor-backend:prod` and pushed to Docker Hub.
220+
The Docker image will be tagged as `devcolor-backend:dev` and `devcolor-backend:latest` and pushed to ECR.
221221

222222
**Install required packages:**
223223
```bash

0 commit comments

Comments
 (0)