update docker actions of maven workflow (#139)

This commit is contained in:
dxfeng10
2021-04-25 15:54:16 +08:00
committed by GitHub
parent 29724e295c
commit bee7f22de0
3 changed files with 21 additions and 21 deletions

View File

@@ -44,7 +44,7 @@ jobs:
fail_if_not_found: false fail_if_not_found: false
default_return_value: ${{ github.ref }} default_return_value: ${{ github.ref }}
value: ${{ github.ref }} value: ${{ github.ref }}
index_of_str: "v" index_of_str: "refs/tags/v"
- name: Packing - name: Packing
if: startsWith(github.ref, 'refs/tags/') if: startsWith(github.ref, 'refs/tags/')
run: | run: |
@@ -74,11 +74,11 @@ jobs:
with: with:
username: ${{ secrets.DOCKERHUB_USERNAME }} username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }} password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push - name: Build and push to DockerHub
if: startsWith(github.ref, 'refs/tags/') if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v2 uses: docker/build-push-action@v2
with: with:
file: ./fizz-bootstrap/Dockerfile file: ./Dockerfile
context: . context: .
push: true push: true
tags: fizzgate/fizz-gateway-community:${{ github.ref }} tags: fizzgate/fizz-gateway-community:${{ steps.releaseVersion.outputs.substring }}

17
Dockerfile Normal file
View File

@@ -0,0 +1,17 @@
FROM java:8
MAINTAINER fizzgate.com
ENV APP_HOME_PATH /opt/fizz-gateway-community
ADD fizz-bootstrap/target/fizz-bootstrap-*.jar ${APP_HOME_PATH}/fizz-gateway-community.jar
COPY fizz-bootstrap/sh/boot.sh ${APP_HOME_PATH}/boot.sh
COPY fizz-bootstrap/sh/docker-entrypoint.sh ${APP_HOME_PATH}/docker-entrypoint.sh
RUN chmod +x ${APP_HOME_PATH}/boot.sh
WORKDIR ${APP_HOME_PATH}
EXPOSE 8600
ENTRYPOINT ["/bin/bash", "./docker-entrypoint.sh"]

View File

@@ -1,17 +0,0 @@
FROM java:8
MAINTAINER fizzgate.com
ENV APP_HOME_PATH /opt/fizz-gateway-community
ADD target/fizz-bootstrap-*.jar ${APP_HOME_PATH}/fizz-gateway-community.jar
COPY sh/boot.sh ${APP_HOME_PATH}/boot.sh
COPY sh/docker-entrypoint.sh ${APP_HOME_PATH}/docker-entrypoint.sh
RUN chmod +x ${APP_HOME_PATH}/boot.sh
WORKDIR ${APP_HOME_PATH}
EXPOSE 8600
ENTRYPOINT ["/bin/bash", "./docker-entrypoint.sh"]