Added resources for the CICD setup

This commit is contained in:
ybandala 2025-02-11 00:24:23 -06:00
parent aa2273e955
commit c9746bb6da
6 changed files with 87 additions and 0 deletions

28
.github/workflows/build.yml vendored Normal file
View file

@ -0,0 +1,28 @@
name: Build and Deploy
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: maven
- name: Build with Maven
run: ./mvnw package -B
- name: Build Docker Image
run: docker build -t petclinic:${{ github.sha }} .
- name: Test
run: ./mvnw test