Skip to content

Update main.yml

Update main.yml #3

Workflow file for this run

name: A workflow for my Hello World app

Check failure on line 1 in .github/workflows/main.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/main.yml

Invalid workflow file

(Line: 11, Col: 9): There's not enough info to determine what you meant. Add one of these properties: run, shell, uses, with, working-directory
on: push
jobs:
build:
name: Hello world action
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- 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