Skip to content

Commit

Permalink
Showing 2 changed files with 15 additions and 16 deletions.
23 changes: 10 additions & 13 deletions .github/workflows/dockerhub-publish.yml
Original file line number Diff line number Diff line change
@@ -25,18 +25,15 @@ jobs:
packages: write

steps:
- name: Download DB2REST packages from Maven Central
run: |
echo "CI--- Using DB2REST_VERSION: ${{ github.event.inputs.DB2REST_VERSION }}"
echo "CI--- Downloading DB2REST JAR from Maven Central"
wget --progress=bar:force:noscroll https://search.maven.org/remotecontent?filepath=io/9tiger/db2rest/$DB2REST_VERSION/db2rest-$DB2REST_VERSION.jar
echo "CI--- File downloaded successfully"
mv *.jar ${{ github.workspace }}/db2rest.jar
pwd
ls -l
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
# - name: Download DB2REST packages from Maven Central
# run: |
# echo "CI--- Using DB2REST_VERSION: ${{ github.event.inputs.DB2REST_VERSION }}"
# echo "CI--- Downloading DB2REST JAR from Maven Central"
# wget --progress=bar:force:noscroll https://search.maven.org/remotecontent?filepath=io/9tiger/db2rest/$DB2REST_VERSION/db2rest-$DB2REST_VERSION.jar
# echo "CI--- File downloaded successfully"
# mv *.jar ${{ github.workspace }}/db2rest.jar
# pwd
# ls -l

- name: Login to DockerHub
uses: docker/login-action@v3
@@ -51,4 +48,4 @@ jobs:
# instead of PATH context `context: .`
push: true
tags: kdhrubo/db2rest:v${{ github.run_number }}, kdhrubo/db2rest:latest
build-args: JAR_FILE=${{ github.workspace }}/db2rest.jar
build_args: DB2REST_VERSION=${{ env.DB2REST_VERSION }}
8 changes: 5 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
FROM bellsoft/liberica-runtime-container:jre-21-cds-slim-musl

ARG JAR_FILE
# Sets default version of db2rest to download during ADD
# Can be overridden during build with option like `--build-arg DB2REST_VERSION=1.2.4`
ARG DB2REST_VERSION=1.2.4

# cp target/db2rest.jar /opt/app/db2rest.jar
COPY $JAR_FILE /opt/app/db2rest.jar
# Adds remote db2rest jar into /opt/app/db2rest.jar
ADD https://search.maven.org/remotecontent?filepath=io/9tiger/db2rest/$DB2REST_VERSION/db2rest-$DB2REST_VERSION.jar /opt/app/db2rest.jar

# cd /opt/app
WORKDIR /opt/app

0 comments on commit 25ab78c

Please sign in to comment.