Skip to content

Commit

Permalink
text 0.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
EdwinBetanc0urt committed Sep 4, 2022
1 parent 85b6f57 commit 6fb8fbc
Show file tree
Hide file tree
Showing 2 changed files with 87 additions and 17 deletions.
100 changes: 85 additions & 15 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ jobs:
build-app:
name: Build dist ADempiere-Vue
runs-on: ubuntu-latest

steps:
- name: Check out the repo
uses: actions/checkout@v3
Expand Down Expand Up @@ -45,12 +44,27 @@ jobs:
- name: Compile dist
run: yarn build:prod

- name: Upload dist app
# - name: Upload dist.zip app as artifact
# uses: actions/upload-artifact@v3
# with:
# name: adempiere-vue
# path: dist

- name: Compress tar.gz action step
uses: a7ul/[email protected]
id: compress
with:
command: c
cwd: .
files: |
dist
outPath: ./adempiere-vue.tar.gz

- name: Upload dist.tar.gz app as artifact
uses: actions/upload-artifact@v3
with:
name: adempiere-vue
path: dist

path: ./adempiere-vue.tar.gz

# Publish dist binaries to application
publish-app-dist:
Expand All @@ -61,23 +75,80 @@ jobs:
- build-app
runs-on: ubuntu-latest
steps:
- name: Download build dist app
- name: Download build dist.tar.gz app
uses: actions/download-artifact@v3
with:
name: adempiere-vue

- name: Compress files for application dist
uses: TheDoctor0/[email protected]
with:
filename: 'Adempiere-Vue.zip'
path: './'
# - name: Compress files for application dist
# uses: TheDoctor0/[email protected]
# with:
# filename: 'Adempiere-Vue.zip'
# path: './'

# - name: Publish application binary in repository
# uses: skx/github-action-publish-binaries@master
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# args: 'Adempiere-Vue.zip'

- name: Rename binary file
run: cp adempiere-vue.tar.gz ADempiere-Vue.tar.gz

- name: Publish application binary in repository
uses: skx/github-action-publish-binaries@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
args: 'Adempiere-Vue.zip'
args: 'ADempiere-Vue.tar.gz'

# # Publish docker image in Github Container Registry to application
# push-imame-ghcr:
# name: Push Docker image to GitHub Container Regitry
# needs:
# - build-app
# runs-on: ubuntu-latest
# steps:
# - name: Check out the repo
# uses: actions/checkout@v3

# - name: Download build dist.tar.gz app
# uses: actions/download-artifact@v3
# with:
# name: adempiere-vue
# path: dist

# - name: Login to GitHub Container Registry
# uses: docker/login-action@v2
# with:
# registry: ghcr.io
# username: ${{ github.actor }}
# password: ${{ secrets.GITHUB_TOKEN }}

# - name: Build and push Docker image
# uses: docker/build-push-action@v3
# with:
# context: .
# file: ./build/Dockerfile.prod
# push: true
# tags: |
# ghcr.io/${{ env.OWNER_LC }}/${{ env.REPO_LC }}:latest
# ghcr.io/${{ env.OWNER_LC }}/${{ env.REPO_LC }}:${{ github.event.release.tag_name }}
# build-args: |
# NGINX_RELEASE=1.21.6

# - name: Build and push Docker Image Alpine
# uses: docker/build-push-action@v3
# with:
# context: .
# file: ./build/Dockerfile.prod
# push: true
# tags: |
# ghcr.io/${{ env.OWNER_LC }}/${{ env.REPO_LC }}:alpine
# ghcr.io/${{ env.OWNER_LC }}/${{ env.REPO_LC }}:alpine-${{ github.event.release.tag_name }}
# build-args: |
# NGINX_RELEASE=1.21.6-alpine

# Check secrets to push image in docker hub registry
check-docker-secrets:
Expand Down Expand Up @@ -113,7 +184,7 @@ jobs:
- name: Check out the repo
uses: actions/checkout@v3

- name: Download build dist app
- name: Download build dist.tar.gz app
uses: actions/download-artifact@v3
with:
name: adempiere-vue
Expand All @@ -139,7 +210,7 @@ jobs:
NGINX_RELEASE=1.21.6
- name: Build and push Docker Image Alpine
uses: docker/build-push-action@v2
uses: docker/build-push-action@v3
with:
context: .
file: ./build/Dockerfile.prod
Expand All @@ -149,12 +220,11 @@ jobs:
${{ secrets.DOCKER_REPO_FRONTEND }}:alpine-${{ github.event.release.tag_name }}
build-args: |
NGINX_RELEASE=1.21.6-alpine
# Build dist documentation ADempiere-Vue
build-docs:
name: Build dist ADempiere-Vue docs
runs-on: ubuntu-latest

steps:
- name: Check out the repo
uses: actions/checkout@v3
Expand Down
4 changes: 2 additions & 2 deletions build/Dockerfile.prod
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ LABEL maintainer="[email protected]; [email protected];" \
ENV API_URL="http://localhost:8085"

COPY build/start.sh .
COPY dist/ /usr/share/nginx/html/
COPY dist/adempiere-vue.tar.gz /usr/share/nginx/html/

RUN chmod +x *.sh
RUN chmod +x *.sh

ENTRYPOINT ["sh" , "start.sh"]

0 comments on commit 6fb8fbc

Please sign in to comment.