Update main.yml #14
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: A workflow for my Hello World App | |
| on: push | |
| jobs: | |
| build: | |
| name: Hello world action | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up JDK 11 | |
| uses: actions/setup-java@v2 | |
| with: | |
| java-version: '17' | |
| distribution: 'adopt' | |
| - name: Setup network | |
| run: | | |
| docker network create --driver bridge se-methods | |
| docker pull mongo | |
| docker run -d --name mongo-dbserver --network se-methods mongo | |
| - name: Build with Maven | |
| run: mvn package | |
| - name: Build | |
| run: docker build -t se_methods . | |
| - name: Run image | |
| run: docker run --network se-methods --name devopscontainer se_methods | |
| - name: view logs | |
| run: docker logs devopscontainer |