Skip to content

Commit 9a05edb

Browse files
authored
Create main.yml
1 parent 6c29d10 commit 9a05edb

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

.github/workflows/main.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: A workflow for my Hello World App
2+
on: push
3+
4+
jobs:
5+
build:
6+
name: Hello world action
7+
runs-on: ubuntu-22.04
8+
steps:
9+
- name: Checkout
10+
uses: actions/checkout@v4
11+
- name: Set up JDK 17
12+
uses: actions/setup-java@v2
13+
with:
14+
java-version: '17'
15+
distribution: 'adopt'
16+
- name: Compile with Maven
17+
run: mvn compile
18+
- name: Build Docker Image
19+
run: docker build -t devopsimage .
20+
- name: Run image
21+
run: docker run --name devopscontainer -d devopsimage
22+
- name: view logs
23+
run: docker logs devopscontainer

0 commit comments

Comments
 (0)