Skip to content

Merge pull request #61 from guma2k2/cart-feature #29

Merge pull request #61 from guma2k2/cart-feature

Merge pull request #61 from guma2k2/cart-feature #29

Workflow file for this run

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
build:
runs-on: [ubuntu-latest]
steps:
- name: Checkout source
uses: actions/checkout@v3
- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
- name: Unit Tests
run: mvn -B test --file pom.xml
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_ACCESS_TOKEN }}
- name: Build the application
run: |
mvn clean
mvn -B package --file pom.xml
- name: Build Docker Image
uses: docker/build-push-action@v3
with:
context: .
dockerfile: Dockerfile
push: false
tags: ${{ secrets.DOCKER_USERNAME }}/elearning-be
- name: Push to Docker Hub
uses: docker/build-push-action@v3
with:
context: .
dockerfile: Dockerfile
push: true
tags: ${{ secrets.DOCKER_USERNAME }}/elearning-be