Skip to content

Commit f62f32c

Browse files
committed
Fix secret names for Docker login
1 parent 4052014 commit f62f32c

1 file changed

Lines changed: 26 additions & 32 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 26 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -4,40 +4,34 @@ on:
44
push:
55
branches: [ main ]
66

7-
env:
8-
REGISTRY: docker.io
9-
IMAGE_NAME_BACKEND: famouswealth/devops-backend
10-
IMAGE_NAME_FRONTEND: famouswealth/devops-frontend
11-
127
jobs:
138
build-and-push:
149
runs-on: ubuntu-latest
1510

1611
steps:
17-
- name: Checkout code
18-
uses: actions/checkout@v3
19-
20-
- name: Set up Docker Buildx
21-
uses: docker/setup-buildx-action@v3
22-
23-
- name: Log in to DockerHub
24-
uses: docker/login-action@v3
25-
with:
26-
username: ${{ secrets.DOCKER_USERNAME }}
27-
password: ${{ secrets.DOCKER_PASSWORD }}
28-
29-
- name: Build and push backend
30-
uses: docker/build-push-action@v5
31-
with:
32-
context: ./backend
33-
file: ./backend/Dockerfile
34-
push: true
35-
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME_BACKEND }}:latest
36-
37-
- name: Build and push frontend
38-
uses: docker/build-push-action@v5
39-
with:
40-
context: ./frontend
41-
file: ./frontend/Dockerfile
42-
push: true
43-
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME_FRONTEND }}:latest
12+
- name: Checkout code
13+
uses: actions/checkout@v3
14+
15+
- name: Set up Docker Buildx
16+
uses: docker/setup-buildx-action@v3
17+
18+
- name: Login to Docker Hub
19+
uses: docker/login-action@v2
20+
with:
21+
username: ${{ secrets.DOCKERHUB_USERNAME }}
22+
password: ${{ secrets.DOCKERHUB_TOKEN }}
23+
24+
25+
- name: Build and push backend
26+
uses: docker/build-push-action@v5
27+
with:
28+
context: ./backend
29+
push: true
30+
tags: famouswealth/devops-e2e-backend:latest
31+
32+
- name: Build and push frontend
33+
uses: docker/build-push-action@v5
34+
with:
35+
context: ./frontend
36+
push: true
37+
tags: famouswealth/devops-e2e-frontend:latest

0 commit comments

Comments
 (0)