Skip to content

Commit cbf4133

Browse files
authored
Update main.yml
1 parent 4074e07 commit cbf4133

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

.github/workflows/main.yml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,21 @@ jobs:
88
steps:
99
- name: Checkout
1010
uses: actions/checkout@v4
11-
- name: Set up JDK 17
11+
- name: Set up JDK 11
1212
uses: actions/setup-java@v2
1313
with:
1414
java-version: '17'
1515
distribution: 'adopt'
16-
- name: Compile with Maven
17-
run: mvn compile
18-
- name: Build Docker Image
19-
run: docker build -t devopsimage .
16+
- name: Setup network
17+
run: |
18+
docker network create --driver bridge se-methods
19+
docker pull mongo
20+
docker run -d --name mongo-dbserver --network se-methods mongo
21+
- name: Build with Maven
22+
run: mvn package
23+
- name: Build
24+
run: docker build -t se_methods .
2025
- name: Run image
21-
run: docker run --name devopscontainer -d devopsimage
26+
run: docker run --network se-methods --name devopscontainer se_methods
2227
- name: view logs
2328
run: docker logs devopscontainer

0 commit comments

Comments
 (0)