Skip to content

Auto-build Docker image of app and push to Docker Hub #14

Auto-build Docker image of app and push to Docker Hub

Auto-build Docker image of app and push to Docker Hub #14

name: Auto-build Docker image of app
on:
workflow_run:
workflows: [Automatic test of app]
types: [completed]
pull_request:
branches:
- 'main'
paths:
- '**.java'
workflow_dispatch:
jobs:
build_docker_image:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: maven
- name: Build Docker image
run: docker build . -t spring-introduction