Skip to content

Commit

Permalink
Create main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
eieihtwesan authored Oct 3, 2024
1 parent ec89640 commit ed24850
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
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

0 comments on commit ed24850

Please sign in to comment.