-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (31 loc) · 889 Bytes
/
build-image.yaml
File metadata and controls
37 lines (31 loc) · 889 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: Build Image Video Service
on:
workflow_call:
secrets:
DOCKER_HUB_ACCESS_TOKEN:
required: true
jobs:
build-image:
name: Build and Push Docker Image
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup JDK 17
uses: actions/setup-java@v3
with:
distribution: 'corretto'
java-version: 17
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: datuits
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Build the application
run: |
mvn clean
mvn -B package --file pom.xml
- name: Build and Push the docker image
run: |
docker build -t datuits/devops-video-service:latest .
docker push datuits/devops-video-service:latest