Skip to content

Commit

Permalink
Create build_docker_image.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Paletrox-Z committed Feb 27, 2024
1 parent 2f72d84 commit 90af2f5
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/build_docker_image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Compile Project

on:
push:
branches: [ "reactive/init" ]
pull_request:
branches: [ "reactive/init" ]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: maven
- name: Build with Maven
run: mvn -B package --file pom.xml

# Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive
- name: Update dependency graph
uses: advanced-security/maven-dependency-submission-action@571e99aab1055c2e71a1e2309b9691de18d6b7d6

- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DH_UNAME }}
password: ${{ secrets.DH_TOKEN }}

- name: Build Image and Push
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: v1v3k6/cp_user-service_reactive:latest

- uses: actions/checkout@v3
- name: Build the Docker image
run: docker build . --file Dockerfile --tag be_user-service:$(date +%s)

0 comments on commit 90af2f5

Please sign in to comment.