mirror of
https://github.com/PanJiaChen/vue-element-admin.git
synced 2025-08-07 18:25:45 +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:
|
||||
release:
|
||||
types:
|
||||
types:
|
||||
- created
|
||||
- edited
|
||||
|
||||
@ -71,9 +71,9 @@ jobs:
|
||||
args: 'Adempiere-Vue.zip'
|
||||
|
||||
|
||||
# Publish docker image to application
|
||||
push-imame-gpr:
|
||||
name: Push Docker image to GitHub Packages
|
||||
# Publish docker image in Github Container Registry to application
|
||||
push-imame-ghcr:
|
||||
name: Push Docker image to GitHub Container
|
||||
needs:
|
||||
- build-app
|
||||
runs-on: ubuntu-latest
|
||||
@ -87,20 +87,72 @@ jobs:
|
||||
name: adempiere-vue
|
||||
path: dist
|
||||
|
||||
- name: Log in to GitHub Docker Registry
|
||||
- name: Login to GitHub Container Registry
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
registry: docker.pkg.github.com
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: set lower case owner name
|
||||
- name: Set Lower Case to owner and repository
|
||||
run: |
|
||||
echo "OWNER_LC=${OWNER,,}" >> ${GITHUB_ENV}
|
||||
echo "REPO_LC=${REPO,,}" >> ${GITHUB_ENV}
|
||||
echo "IMAGE_NAME=adempiere-vue" >> ${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 }}'
|
||||
|
||||
- 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 }}'
|
||||
|
||||
- name: Build and push Docker image
|
||||
@ -110,8 +162,9 @@ jobs:
|
||||
file: ./build/Dockerfile.prod
|
||||
push: true
|
||||
tags: |
|
||||
docker.pkg.github.com/${{ env.REPO_LC }}/${{ env.IMAGE_NAME }}:${{ github.sha }}
|
||||
docker.pkg.github.com/${{ env.REPO_LC }}/${{ env.IMAGE_NAME }}:${{ github.event.release.tag_name }}
|
||||
${{ env.OWNER_LC }}/${{ env.REPO_LC }}:latest
|
||||
${{ env.OWNER_LC }}/${{ env.REPO_LC }}:${{ github.sha }}
|
||||
${{ env.OWNER_LC }}/${{ env.REPO_LC }}:${{ github.event.release.tag_name }}
|
||||
|
||||
- name: Image digest
|
||||
run: echo ${{ steps.docker_build.outputs.digest }}
|
||||
|
22
README.es.md
22
README.es.md
@ -4,25 +4,29 @@
|
||||
|
||||
<p align="center">
|
||||
<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 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 href="https://travis-ci.org/adempiere/adempiere-vue" rel="nofollow">
|
||||
<img src="https://travis-ci.org/adempiere/adempiere=vue.svg?branch=develop" alt="Estado de Construcción">
|
||||
<a href="https://hub.docker.com/r/erpya/adempiere-vue/">
|
||||
<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 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 href="https://github.com/adempiere/adempiere-vue/releases">
|
||||
<img src="https://img.shields.io/github/release/adempiere/adempiere-vue.svg" alt="Liberación Github">
|
||||
<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">
|
||||
</a>
|
||||
<a href="https://gitter.im/adempiere/adempiere-vue">
|
||||
<img src="https://badges.gitter.im/Join%20Chat.svg" alt="Gitter">
|
||||
</a>
|
||||
</p>
|
||||
|
||||
|
||||
Español | [Inglés](./README.md)
|
||||
|
||||
## 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).
|
||||
|
||||
- [Vista Prévia de la Aplicación](https://demo-ui.erpya.com/)
|
||||
|
||||
|
||||
- **User**: 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
|
||||
|
||||
[Vista Prévia de la Aplicación](https://demo-ui.erpya.com/)
|
||||
|
||||
|
||||
- **User**: demo
|
||||
- **Password**: demo
|
||||
|
||||
|
17
README.md
17
README.md
@ -4,22 +4,25 @@
|
||||
|
||||
<p align="center">
|
||||
<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 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 href="https://travis-ci.org/adempiere/adempiere-vue" rel="nofollow">
|
||||
<img src="https://travis-ci.org/adempiere/adempiere=vue.svg?branch=develop" alt="Build Status">
|
||||
<a href="https://hub.docker.com/r/erpya/adempiere-vue/">
|
||||
<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 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">
|
||||
</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">
|
||||
</a>
|
||||
<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>
|
||||
</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).
|
||||
|
||||
- [Preview](https://demo-ui.erpya.com/)
|
||||
|
||||
|
||||
- **User**: 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" \
|
||||
|
Loading…
x
Reference in New Issue
Block a user