You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: .github/workflows/docker-publish.yml
+9-14
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
name: Build and Publish Docker Image
1
+
name: Docker Compose Build and Up
2
2
3
3
on:
4
4
push:
@@ -9,7 +9,7 @@ on:
9
9
- main
10
10
11
11
jobs:
12
-
build-and-publish:
12
+
build-and-up:
13
13
runs-on: ubuntu-latest
14
14
15
15
steps:
@@ -36,18 +36,13 @@ jobs:
36
36
restore-keys: |
37
37
${{ runner.os }}-buildx-
38
38
39
-
- name: Build and push Docker images
40
-
uses: docker/build-push-action@v4
41
-
with:
42
-
context: .
43
-
push: true
44
-
tags: ${{ secrets.DOCKER_USERNAME }}/my-image:latest # Change this to your Docker image name
45
-
file: ./path/to/your/Dockerfile # Adjust if you are using a specific Dockerfile
39
+
- name: Build and run Docker Compose
40
+
run: docker-compose -f docker-compose.yaml up --build -d
46
41
47
-
- name: Docker Compose Build
48
-
run: docker-compose -f docker-compose.yml build
42
+
- name: Run tests (optional)
43
+
run: docker-compose -f docker-compose.yaml exec <service-name> <test-command> # Replace <service-name> and <test-command> with your service name and test command
0 commit comments