Skip to content

api-server Maven Build #12

api-server Maven Build

api-server Maven Build #12

Workflow file for this run

# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
name: api-server Maven Build
#on:
# push:
# branches: [ main ]
on: workflow_dispatch
jobs:
build:
runs-on: ubuntu-latest
env:
APP_VERSION: "${{ secrets.APP_VERSION }}"
steps:
- name: Checkout api-server code
uses: actions/checkout@v2
- name: Set up JDK 8
uses: actions/setup-java@v2
with:
java-version: '8'
distribution: 'adopt'
cache: maven
- name: Build with Maven
run: mvn -B --file project-sources/api-server/pom.xml clean package
- name: Docker Build and Push
uses: mr-smithers-excellent/docker-build-push@v5
with:
image: zbalogh/reservation-api-server
tags: latest, ${{ env.APP_VERSION }}
registry: docker.io
directory: project-sources/api-server
dockerfile: project-sources/api-server/Dockerfile
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}