forked from utmstack/UTMStack
-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (40 loc) · 1.17 KB
/
used-docker-java.yml
File metadata and controls
44 lines (40 loc) · 1.17 KB
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
38
39
40
41
42
43
44
name: Docker Image Java
on:
workflow_call:
inputs:
image_name:
required: true
type: string
environment:
required: true
type: string
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out code into the right branch
uses: actions/checkout@v4
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: "11"
distribution: "temurin"
- name: Build with Maven
working-directory: ./${{inputs.image_name}}
run: |
echo "Building with maven"
mvn clean install -U -s settings.xml
env:
MAVEN_TK: ${{ secrets.GITHUB_TOKEN }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: utmstack
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and Push the Image
uses: docker/build-push-action@v5
with:
context: /home/runner/work/UTMStack/UTMStack/${{inputs.image_name}}/
push: true
tags: ghcr.io/utmstack/utmstack/${{inputs.image_name}}:${{inputs.environment}}