-
Notifications
You must be signed in to change notification settings - Fork 242
41 lines (36 loc) · 1.23 KB
/
microservice-build-image.yaml
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
#
name: Create and publish a Docker image
on:
workflow_call:
secrets:
USER_NAME:
description: "User Name for maven pulls"
required: true
ACCESS_TOKEN:
description: "Access token for maven pulls"
required: true
jobs:
build-and-push-datawave-images:
runs-on: ubuntu-latest
steps:
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ secrets.USER_NAME }}
password: ${{ secrets.ACCESS_TOKEN }}
- name: Checkout Code
uses: actions/checkout@v4
- name: Set up JDK 11
uses: actions/setup-java@v4
with:
distribution: "zulu"
java-version: 11
cache: 'maven'
- name: Build And Push Docker Image (Maven)
env:
MAVEN_OPTS: "-Dhttps.protocols=TLSv1.2 -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=WARN -Djava.awt.headless=true"
USER_NAME: ${{ secrets.USER_NAME }}
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
run: |
mvn -s $GITHUB_WORKSPACE/.github/workflows/settings.xml -V -B -e clean install -Pdocker,exec -Ddocker.image.prefix=ghcr.io/nationalsecurityagency/ -DpushImage