Skip to content
Open
21 changes: 6 additions & 15 deletions .github/workflows/maven.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -11,26 +11,17 @@ on:

jobs:
build:

runs-on: ubuntu-latest

runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
- uses: actions/checkout@v4
- name: Set up JDK 1.8 test
uses: actions/setup-java@v1
with:
java-version: '1.8'
distribution: 'adopt'
cache: maven
- name: Build with Maven
- name: Build with Maven testing
run: mvn clean install
- name: Build the Docker image
run: docker build . --file Dockerfile --tag my-image-name:$(date +%s)

- name: Build & push Docker image
uses: mr-smithers-excellent/docker-build-push@v5
with:
image: javatechie/springboot-images-new
tags: latest
registry: docker.io
dockerfile: Dockerfile
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}