Skip to content

Update Dockerfile

Update Dockerfile #2

Workflow file for this run

name: Java CI with Maven
on:
workflow_dispatch:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
java-version: '21'
distribution: 'temurin'
cache: maven
- name: Build with Maven
run: mvn -DskipTests=true -B package --file pom.xml
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DHB_USERNAME }}
password: ${{ secrets.DHB_PASSWORD }}
- name: Build and Push Docker Image
run: |
docker build --tag aliothmoon/cdk-backend:latest .
docker push aliothmoon/cdk-backend:latest