changed openjdk:17 version #3
This file contains 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-20.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v2 | |
with: | |
java-version: '17' | |
distribution: 'adopt' | |
- name: Compile with Maven | |
run: mvn compile | |
- name: Build Docker Image | |
run: docker build -t devopsimage . | |
- name: Run image | |
run: docker run --name devopscontainer -d devopsimage | |
- name: view logs | |
run: docker logs devopscontainer |