diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 5b778b3f7..e432fdc4d 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -46,28 +46,30 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Login to GitHub Container Registry - uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} + #- name: Login to GitHub Container Registry + # uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc + # with: + # registry: ghcr.io + # username: ${{ github.actor }} + # password: ${{ secrets.GITHUB_TOKEN }} - - name: Build and push Docker image - uses: docker/build-push-action@2eb1c1961a95fc15694676618e422e8ba1d63825 - with: - context: . - push: true - tags: ghcr.io/${{ env.IMAGE_NAME }}:${{ steps.semantic.outputs.release-version }} - labels: ${{ steps.meta.outputs.labels }} - build-args: | - VERSION=${{ steps.semantic.outputs.release-version }} + #- name: Build and push Docker image + # uses: docker/build-push-action@2eb1c1961a95fc15694676618e422e8ba1d63825 + # with: + # context: . + # push: true + # tags: ghcr.io/${{ env.IMAGE_NAME }}:${{ steps.semantic.outputs.release-version }} + # labels: ${{ steps.meta.outputs.labels }} + # build-args: | + # VERSION=${{ steps.semantic.outputs.release-version }} - name: Publish tag uses: rickstaa/action-create-tag@07b918ecbf94359b859f25f7a70553a84e804923 with: tag: ${{ steps.semantic.outputs.release-version }} message: ${{ steps.semantic.outputs.name }}\n${{ steps.semantic.outputs.release-notes }} + #TODO: force_push_tag is true for debug purpose only + force_push_tag: true outputs: version: ${{ steps.semantic.outputs.release-version }} diff --git a/Dockerfile b/Dockerfile index bb13a22b0..e53b9b885 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,12 +1,11 @@ FROM eclipse-temurin@sha256:039f727ed86402f37524b5d01a129947e2f061d5856901d07d73a454e689bb13 AS builder -# speed the things up -#ARG VERSION undefined -#ENV VERSION=$VERSION -#WORKDIR /app -#COPY . . -#RUN ./gradlew build -x test -Pversion=$VERSION -# -#FROM eclipse-temurin@sha256:e90e0d654765ab3ae33f5c5155daafa4a907d0d738ce98c3be8f402a8edcee2b -#ENV PORT 8080 -#WORKDIR /app -#COPY --from=builder /app/build/libs/*jar . +ARG VERSION undefined +ENV VERSION=$VERSION +WORKDIR /app +COPY . . +RUN ./gradlew build -x test -Pversion=$VERSION + +FROM eclipse-temurin@sha256:e90e0d654765ab3ae33f5c5155daafa4a907d0d738ce98c3be8f402a8edcee2b +ENV PORT 8080 +WORKDIR /app +COPY --from=builder /app/build/libs/*jar .