Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
MiguelPelegrina committed Apr 2, 2024
2 parents 6a7b7f4 + 352b068 commit 2a79ebd
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 65 deletions.
24 changes: 11 additions & 13 deletions .github/workflows/docker-image.yml → .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
name: Docker Image CI
name: CI Workflow

on:
push:
push:
branches: [ "master" ]
pull_request:
pull_request:
branches: [ "master" ]
workflow_dispatch:
workflow_dispatch:

jobs:

build:

build:
runs-on: ubuntu-latest
env:
MAIL_USERNAME: ${{ secrets.EMAIL_NAME }}
MAIL_PASSWORD: ${{ secrets.EMAIL_PASSWORD }}

services:
postgres:
image: postgres
env:
POSTGRES_DB: online_store
POSTGRES_DB: ${{ secrets.POSTGRES_DB }}
POSTGRES_USER: ${{ secrets.POSTGRES_USER }}
POSTGRES_PASSWORD: ${{ secrets.POSTGRES_PASSWORD }}
options: >-
Expand All @@ -36,25 +37,20 @@ jobs:
java-version: '17'
distribution: 'temurin'
cache: maven

- name: Build with Maven
run: mvn -B package --file pom.xml

- name: Build and test
run: chmod +x mvnw && ./mvnw clean package

- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v1
with:
images: migupele/java_school_online_store_api

- name: Build and push Docker image
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671
with:
Expand All @@ -63,3 +59,5 @@ jobs:
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: Update dependency graph
uses: advanced-security/maven-dependency-submission-action@571e99aab1055c2e71a1e2309b9691de18d6b7d6
52 changes: 0 additions & 52 deletions .github/workflows/maven.yml

This file was deleted.

0 comments on commit 2a79ebd

Please sign in to comment.