mirror of
https://github.com/PanJiaChen/vue-element-admin.git
synced 2025-08-10 12:01:57 +08:00
feat: Add support docker hub continuous delivery. (#1016)
* feat: Add support docker hub continuous delivery. * remove comments
This commit is contained in:
parent
14f833ab87
commit
12c3aef872
75
.github/workflows/publish.yml
vendored
75
.github/workflows/publish.yml
vendored
@ -6,7 +6,7 @@ name: Publish Project
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
release:
|
release:
|
||||||
types:
|
types:
|
||||||
- created
|
- created
|
||||||
- edited
|
- edited
|
||||||
|
|
||||||
@ -71,9 +71,9 @@ jobs:
|
|||||||
args: 'Adempiere-Vue.zip'
|
args: 'Adempiere-Vue.zip'
|
||||||
|
|
||||||
|
|
||||||
# Publish docker image to application
|
# Publish docker image in Github Container Registry to application
|
||||||
push-imame-gpr:
|
push-imame-ghcr:
|
||||||
name: Push Docker image to GitHub Packages
|
name: Push Docker image to GitHub Container
|
||||||
needs:
|
needs:
|
||||||
- build-app
|
- build-app
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@ -87,20 +87,72 @@ jobs:
|
|||||||
name: adempiere-vue
|
name: adempiere-vue
|
||||||
path: dist
|
path: dist
|
||||||
|
|
||||||
- name: Log in to GitHub Docker Registry
|
- name: Login to GitHub Container Registry
|
||||||
uses: docker/login-action@v1
|
uses: docker/login-action@v1
|
||||||
with:
|
with:
|
||||||
registry: docker.pkg.github.com
|
registry: ghcr.io
|
||||||
username: ${{ github.actor }}
|
username: ${{ github.actor }}
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: set lower case owner name
|
- name: Set Lower Case to owner and repository
|
||||||
run: |
|
run: |
|
||||||
echo "OWNER_LC=${OWNER,,}" >> ${GITHUB_ENV}
|
echo "OWNER_LC=${OWNER,,}" >> ${GITHUB_ENV}
|
||||||
echo "REPO_LC=${REPO,,}" >> ${GITHUB_ENV}
|
echo "REPO_LC=${NAME,,}" >> ${GITHUB_ENV}
|
||||||
echo "IMAGE_NAME=adempiere-vue" >> ${GITHUB_ENV}
|
echo "OWNER_REPO_LC=${REPO,,}" >> ${GITHUB_ENV}
|
||||||
env:
|
env:
|
||||||
OWNER: '${{ github.repository_owner }}'
|
OWNER: '${{ github.repository_owner }}'
|
||||||
|
NAME: '${{ github.event.repository.name }}'
|
||||||
|
REPO: '${{ github.repository }}'
|
||||||
|
|
||||||
|
- run: echo ${{ env }}
|
||||||
|
|
||||||
|
- name: Build and push Docker image
|
||||||
|
uses: docker/build-push-action@v2
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
file: ./build/Dockerfile.prod
|
||||||
|
push: true
|
||||||
|
# load: true
|
||||||
|
tags: |
|
||||||
|
ghcr.io/${{ env.OWNER_LC }}/${{ env.REPO_LC }}:latest
|
||||||
|
ghcr.io/${{ env.OWNER_LC }}/${{ env.REPO_LC }}:${{ github.sha }}
|
||||||
|
ghcr.io/${{ env.OWNER_LC }}/${{ env.REPO_LC }}:${{ github.event.release.tag_name }}
|
||||||
|
|
||||||
|
- name: Image digest
|
||||||
|
run: echo ${{ steps.docker_build.outputs.digest }}
|
||||||
|
|
||||||
|
|
||||||
|
# Publish docker image in Docker Hub registry to application
|
||||||
|
push-imame-dhr:
|
||||||
|
name: Push Docker image to Docker Hub
|
||||||
|
needs:
|
||||||
|
- build-app
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Check out the repo
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Download build dist app
|
||||||
|
uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
name: adempiere-vue
|
||||||
|
path: dist
|
||||||
|
|
||||||
|
- name: Login to GitHub Container Registry
|
||||||
|
uses: docker/login-action@v1
|
||||||
|
with:
|
||||||
|
# CONFIGURE DOCKER SECRETS INTO REPOSITORY
|
||||||
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Set Lower Case to owner and repository
|
||||||
|
run: |
|
||||||
|
echo "OWNER_LC=${OWNER,,}" >> ${GITHUB_ENV}
|
||||||
|
echo "REPO_LC=${NAME,,}" >> ${GITHUB_ENV}
|
||||||
|
echo "OWNER_REPO_LC=${REPO,,}" >> ${GITHUB_ENV}
|
||||||
|
env:
|
||||||
|
OWNER: '${{ github.repository_owner }}'
|
||||||
|
NAME: '${{ github.event.repository.name }}'
|
||||||
REPO: '${{ github.repository }}'
|
REPO: '${{ github.repository }}'
|
||||||
|
|
||||||
- name: Build and push Docker image
|
- name: Build and push Docker image
|
||||||
@ -110,8 +162,9 @@ jobs:
|
|||||||
file: ./build/Dockerfile.prod
|
file: ./build/Dockerfile.prod
|
||||||
push: true
|
push: true
|
||||||
tags: |
|
tags: |
|
||||||
docker.pkg.github.com/${{ env.REPO_LC }}/${{ env.IMAGE_NAME }}:${{ github.sha }}
|
${{ env.OWNER_LC }}/${{ env.REPO_LC }}:latest
|
||||||
docker.pkg.github.com/${{ env.REPO_LC }}/${{ env.IMAGE_NAME }}:${{ github.event.release.tag_name }}
|
${{ env.OWNER_LC }}/${{ env.REPO_LC }}:${{ github.sha }}
|
||||||
|
${{ env.OWNER_LC }}/${{ env.REPO_LC }}:${{ github.event.release.tag_name }}
|
||||||
|
|
||||||
- name: Image digest
|
- name: Image digest
|
||||||
run: echo ${{ steps.docker_build.outputs.digest }}
|
run: echo ${{ steps.docker_build.outputs.digest }}
|
||||||
|
22
README.es.md
22
README.es.md
@ -4,25 +4,29 @@
|
|||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<a href="https://github.com/vuejs/vue">
|
<a href="https://github.com/vuejs/vue">
|
||||||
<img src="https://img.shields.io/badge/vue-2.6.10-brightgreen.svg" alt="vue">
|
<img src="https://img.shields.io/badge/vue-2.6.10-brightgreen.svg" alt="vue version">
|
||||||
</a>
|
</a>
|
||||||
<a href="https://github.com/ElemeFE/element">
|
<a href="https://github.com/ElemeFE/element">
|
||||||
<img src="https://img.shields.io/badge/element--ui-2.7.0-brightgreen.svg" alt="element-ui">
|
<img src="https://img.shields.io/badge/element--ui-2.15.3-brightgreen.svg" alt="element-ui">
|
||||||
</a>
|
</a>
|
||||||
<a href="https://travis-ci.org/adempiere/adempiere-vue" rel="nofollow">
|
<a href="https://hub.docker.com/r/erpya/adempiere-vue/">
|
||||||
<img src="https://travis-ci.org/adempiere/adempiere=vue.svg?branch=develop" alt="Estado de Construcción">
|
<img src="https://img.shields.io/docker/pulls/erpya/adempiere-vue.svg" alt="Docker Pulls">
|
||||||
|
</a>
|
||||||
|
<a href="https://github.com/adempiere/adempiere-vue/actions/workflows/publish.yml">
|
||||||
|
<img src="https://github.com/adempiere/adempiere-vue/actions/workflows/publish.yml/badge.svg" alt="Publish GH Action">
|
||||||
</a>
|
</a>
|
||||||
<a href="https://github.com/adempiere/adempiere-vue/blob/master/LICENSE">
|
<a href="https://github.com/adempiere/adempiere-vue/blob/master/LICENSE">
|
||||||
<img src="https://img.shields.io/badge/license-GNU/GPL%20(v3)-blue" alt="Licencia">
|
<img src="https://img.shields.io/badge/license-GNU/GPL%20(v3)-blue" alt="license">
|
||||||
</a>
|
</a>
|
||||||
<a href="https://github.com/adempiere/adempiere-vue/releases">
|
<a href="https://github.com/adempiere/adempiere-vue/releases/latest">
|
||||||
<img src="https://img.shields.io/github/release/adempiere/adempiere-vue.svg" alt="Liberación Github">
|
<img src="https://img.shields.io/github/release/adempiere/adempiere-vue.svg" alt="GitHub release">
|
||||||
</a>
|
</a>
|
||||||
<a href="https://gitter.im/adempiere/adempiere-vue">
|
<a href="https://gitter.im/adempiere/adempiere-vue">
|
||||||
<img src="https://badges.gitter.im/Join%20Chat.svg" alt="Gitter">
|
<img src="https://badges.gitter.im/Join%20Chat.svg" alt="Gitter">
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
Español | [Inglés](./README.md)
|
Español | [Inglés](./README.md)
|
||||||
|
|
||||||
## Introducción
|
## Introducción
|
||||||
@ -36,7 +40,7 @@ Este es una gran UI para [ADempiere ERP, CRM & SCM](https://github.com/adempiere
|
|||||||
[adempiere-vue](https://github.com/adempiere/adempiere-vue) usa como RPC (Llamado a Procedimientos Remotos)[gRPC](https://grpc.io/) como [server](https://github.com/adempiere/adempiere-gRPC-Server).
|
[adempiere-vue](https://github.com/adempiere/adempiere-vue) usa como RPC (Llamado a Procedimientos Remotos)[gRPC](https://grpc.io/) como [server](https://github.com/adempiere/adempiere-gRPC-Server).
|
||||||
|
|
||||||
- [Vista Prévia de la Aplicación](https://demo-ui.erpya.com/)
|
- [Vista Prévia de la Aplicación](https://demo-ui.erpya.com/)
|
||||||
|
|
||||||
- **User**: demo
|
- **User**: demo
|
||||||
- **Password**: demo
|
- **Password**: demo
|
||||||
|
|
||||||
@ -233,7 +237,7 @@ Los cambios detallados por cada liberación se encuentran en [notas de liberaci
|
|||||||
## Demostración en línea
|
## Demostración en línea
|
||||||
|
|
||||||
[Vista Prévia de la Aplicación](https://demo-ui.erpya.com/)
|
[Vista Prévia de la Aplicación](https://demo-ui.erpya.com/)
|
||||||
|
|
||||||
- **User**: demo
|
- **User**: demo
|
||||||
- **Password**: demo
|
- **Password**: demo
|
||||||
|
|
||||||
|
17
README.md
17
README.md
@ -4,22 +4,25 @@
|
|||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<a href="https://github.com/vuejs/vue">
|
<a href="https://github.com/vuejs/vue">
|
||||||
<img src="https://img.shields.io/badge/vue-2.6.10-brightgreen.svg" alt="vue">
|
<img src="https://img.shields.io/badge/vue-2.6.10-brightgreen.svg" alt="vue version">
|
||||||
</a>
|
</a>
|
||||||
<a href="https://github.com/ElemeFE/element">
|
<a href="https://github.com/ElemeFE/element">
|
||||||
<img src="https://img.shields.io/badge/element--ui-2.7.0-brightgreen.svg" alt="element-ui">
|
<img src="https://img.shields.io/badge/element--ui-2.15.3-brightgreen.svg" alt="element-ui">
|
||||||
</a>
|
</a>
|
||||||
<a href="https://travis-ci.org/adempiere/adempiere-vue" rel="nofollow">
|
<a href="https://hub.docker.com/r/erpya/adempiere-vue/">
|
||||||
<img src="https://travis-ci.org/adempiere/adempiere=vue.svg?branch=develop" alt="Build Status">
|
<img src="https://img.shields.io/docker/pulls/erpya/adempiere-vue.svg" alt="Docker Pulls">
|
||||||
|
</a>
|
||||||
|
<a href="https://github.com/adempiere/adempiere-vue/actions/workflows/publish.yml">
|
||||||
|
<img src="https://github.com/adempiere/adempiere-vue/actions/workflows/publish.yml/badge.svg" alt="Publish GH Action">
|
||||||
</a>
|
</a>
|
||||||
<a href="https://github.com/adempiere/adempiere-vue/blob/master/LICENSE">
|
<a href="https://github.com/adempiere/adempiere-vue/blob/master/LICENSE">
|
||||||
<img src="https://img.shields.io/badge/license-GNU/GPL%20(v3)-blue" alt="license">
|
<img src="https://img.shields.io/badge/license-GNU/GPL%20(v3)-blue" alt="license">
|
||||||
</a>
|
</a>
|
||||||
<a href="https://github.com/adempiere/adempiere-vue/releases">
|
<a href="https://github.com/adempiere/adempiere-vue/releases/latest">
|
||||||
<img src="https://img.shields.io/github/release/adempiere/adempiere-vue.svg" alt="GitHub release">
|
<img src="https://img.shields.io/github/release/adempiere/adempiere-vue.svg" alt="GitHub release">
|
||||||
</a>
|
</a>
|
||||||
<a href="https://gitter.im/adempiere/adempiere-vue">
|
<a href="https://gitter.im/adempiere/adempiere-vue">
|
||||||
<img src="https://badges.gitter.im/Join%20Chat.svg" alt="gitter">
|
<img src="https://badges.gitter.im/Join%20Chat.svg" alt="Gitter">
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@ -37,7 +40,7 @@ It is a great UI for [ADempiere ERP, CRM & SCM](https://github.com/adempiere/ade
|
|||||||
[adempiere-vue](https://github.com/adempiere/adempiere-vue) use the modern open source high performance RPC framework that can run in any environment [gRPC](https://grpc.io/) as [server](https://github.com/adempiere/adempiere-gRPC-Server).
|
[adempiere-vue](https://github.com/adempiere/adempiere-vue) use the modern open source high performance RPC framework that can run in any environment [gRPC](https://grpc.io/) as [server](https://github.com/adempiere/adempiere-gRPC-Server).
|
||||||
|
|
||||||
- [Preview](https://demo-ui.erpya.com/)
|
- [Preview](https://demo-ui.erpya.com/)
|
||||||
|
|
||||||
- **User**: demo
|
- **User**: demo
|
||||||
- **Password**: demo
|
- **Password**: demo
|
||||||
|
|
||||||
|
37
build/Dockerfile.dist
Normal file
37
build/Dockerfile.dist
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
FROM nginx:1.21.1-alpine
|
||||||
|
|
||||||
|
LABEL maintainer="EdwinBetanc0urt@outlook.com" \
|
||||||
|
description="ADempiere-Vue"
|
||||||
|
|
||||||
|
# Add operative system dependencies
|
||||||
|
RUN rm -rf /var/cache/apk/* && \
|
||||||
|
apk update && \
|
||||||
|
apk add \
|
||||||
|
--virtual .build-deps \
|
||||||
|
ca-certificates \
|
||||||
|
curl \
|
||||||
|
unzip
|
||||||
|
|
||||||
|
ARG RELEASE_VERSION="rt-4.8"
|
||||||
|
|
||||||
|
ENV URL_REPO="https://github.com/adempiere/adempiere-vue" \
|
||||||
|
BINARY_NAME="Adempiere-Vue.zip" \
|
||||||
|
API_URL="https://api.erpya.com"
|
||||||
|
|
||||||
|
COPY start.sh .
|
||||||
|
|
||||||
|
# Create app directory
|
||||||
|
RUN cd /usr/share/nginx/html && \
|
||||||
|
# Download release file
|
||||||
|
curl --output $BINARY_NAME \
|
||||||
|
-L "$URL_REPO/releases/download/$RELEASE_VERSION/$BINARY_NAME" && \
|
||||||
|
# uncompress and delete files
|
||||||
|
unzip -o $BINARY_NAME && \
|
||||||
|
# delete unised files
|
||||||
|
apk del .build-deps && \
|
||||||
|
rm $BINARY_NAME && \
|
||||||
|
rm -rf /tmp/* && \
|
||||||
|
# Rename project folder
|
||||||
|
mv dist/* /usr/share/nginx/html/
|
||||||
|
|
||||||
|
CMD 'sh' 'start.sh'
|
@ -1,4 +1,4 @@
|
|||||||
FROM nginx:1.19.9-alpine
|
FROM nginx:1.21.1-alpine
|
||||||
|
|
||||||
|
|
||||||
LABEL maintainer="EdwinBetanc0urt@outlook.com" \
|
LABEL maintainer="EdwinBetanc0urt@outlook.com" \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user