Skip to content

Commit 10228ae

Browse files
author
shashankiifetech
committed
update the yml
1 parent 999046e commit 10228ae

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

.github/workflows/main.yml

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build and push Docker image to Docker Hub
1+
name: Build and push Docker images
22

33
on:
44
push:
@@ -7,20 +7,28 @@ on:
77
jobs:
88
build:
99
runs-on: ubuntu-latest
10+
strategy:
11+
matrix:
12+
include:
13+
- name: api
14+
dockerfile: Dockerfile.api
15+
- name: worker
16+
dockerfile: Dockerfile.worker
1017

1118
steps:
12-
- name: Check out the repo
19+
- name: Checkout code
1320
uses: actions/checkout@v4
1421

15-
- name: Login to Docker Hub
22+
- name: Docker Hub login
1623
uses: docker/login-action@v3
1724
with:
1825
username: ${{ secrets.DOCKER_USER_NAME }}
19-
password: ${{ secrets.DOCKER_SECERT }}
26+
password: ${{ secrets.DOCKER_SECRET }}
2027

21-
- name: Build and push to Docker Hub
28+
- name: Build and push ${{ matrix.name }}
2229
uses: docker/build-push-action@v5
2330
with:
2431
context: .
32+
file: ${{ matrix.dockerfile }}
2533
push: true
26-
tags: hydro2070/complier:latest
34+
tags: hydro2070/complier-${{ matrix.name }}:latest

0 commit comments

Comments
 (0)