feat: remove build agent in pipeline #45
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: OnlineBookStoreImageBuild | ||
on: [pull] | ||
jobs: | ||
build-image: | ||
name: Build the image | ||
runs-on: ubuntu:latest | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v3 | ||
- name: Setup java | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '17' | ||
distribution: 'temurin' | ||
cache: maven | ||
- run: mvn --batch-mode --update-snapshots verify | ||
- run: mkdir staging && cp target/*.war staging/books.war | ||
- name: Image build using Dockerfile | ||
run : | ||
docker build -t aapurva/java-webapps:v1.0.0 . | ||