📝 action configs
This commit is contained in:
@@ -1,10 +1,17 @@
|
||||
#Jay Ehsaniara, Dockerfile should be in project root where pom.xml locates
|
||||
FROM maven:3.6.3-jdk-11-slim AS maven_builder
|
||||
ARG GITHUB_TOKEN
|
||||
COPY pom.xml /application/
|
||||
COPY src /application/src/
|
||||
WORKDIR /application/
|
||||
RUN echo "<settings><servers><server><id>github</id><username>OWNER</username><password>${GITHUB_TOKEN}</password></server></servers></settings>" > settings.xml
|
||||
RUN mvn clean package -s settings.xml
|
||||
RUN \
|
||||
if [ "x$GITHUB_TOKEN" = "x" ] ; then \
|
||||
echo "Argument not provided" ; \
|
||||
else\
|
||||
echo "<settings><servers><server><id>github</id><username>OWNER</username><password>${GITHUB_TOKEN}</password></server></servers></settings>" > settings.xml ; \
|
||||
&& sed -i 's|</project>|<repositories><repository><id>github</id><name>GitHub</name><url>https://maven.pkg.github.com/ehsaniara/scs-kafka-intro</url></repository></repositories></project>|g' pom.xml ; \
|
||||
fi
|
||||
RUN if [ "x$GITHUB_TOKEN" = "x" ] ; then mvn clean package ; else mvn clean package -s settings.xml ; fi
|
||||
|
||||
# extract spring boot the layers
|
||||
FROM openjdk:11-jdk-slim as jar_builder
|
||||
|
||||
@@ -65,14 +65,6 @@
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>github</id>
|
||||
<name>GitHub ehsaniara Apache Maven Packages</name>
|
||||
<url>https://maven.pkg.github.com/ehsaniara/scs-kafka-intro</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
|
||||
Reference in New Issue
Block a user