Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/workflows/prodBuilder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ on:
required: true
DOCKERHUB_TOKEN:
required: true
MM_GHT:
required: false
FE_PORT:
required: false

jobs:
Build:
Expand Down Expand Up @@ -51,6 +55,9 @@ jobs:
${{ inputs.tags }}:${{ inputs.next_ver }}, ${{ inputs.tags }}:latest
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new
build-args: |
${{ inputs.myid == 'app' && 'MM_GHT=' || '' }}${{ inputs.myid == 'app' && secrets.MM_GHT || '' }}
${{ inputs.myid == 'app' && 'PORT=' || '' }}${{ inputs.myid == 'app' && secrets.FE_PORT || '8080' }}
- name: Move cache
run: |
rm -rf /tmp/.buildx-cache
Expand Down
51 changes: 36 additions & 15 deletions .github/workflows/prodci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,46 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Cache Dependencies
# - name: Cache Dependencies
# uses: actions/cache@v3
# with:
# path: ~/.npm
# key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
# restore-keys: |
# ${{ runner.os }}-node-
# - name: Use NodeJS
# uses: actions/setup-node@v3
# with:
# node-version: '17.9.1'
- name: Setup Node.js 22 for frontend
uses: actions/setup-node@v3
with:
node-version: '22'
- name: Enable pnpm for frontend
run: corepack enable && corepack prepare pnpm@latest --activate
- name: Cache pnpm dependencies
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
path: ~/.pnpm-store
key: ${{ runner.os }}-pnpm-${{ hashFiles('app/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-node-
- name: Use NodeJS
uses: actions/setup-node@v3
with:
node-version: '17.9.1'
- name: Install frontend dependencies & test
${{ runner.os }}-pnpm-
- name: Install frontend dependencies
run: |
cd app
npm ci
- name: App Coverage Test
run: |
cd app
npm run test:unit -- --coverage
pnpm install --frozen-lockfile
env:
CI: true
MM_GHT: ${{ secrets.MM_GHT }}
# - name: Install frontend dependencies & test
# run: |
# cd app
# npm ci
# - name: App Coverage Test
# run: |
# cd app
# npm run test:unit -- --coverage
# env:
# CI: true
- name: Zip Frontend App Assets
if: github.event_name == 'push'
run: |
Expand Down Expand Up @@ -116,6 +135,8 @@ jobs:
secrets:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
MM_GHT: ${{ secrets.MM_GHT }}
FE_PORT: ${{ secrets.FE_PORT }}
buildBackendApp:
if: github.event_name == 'push'
needs: [buildFrontendApp, release]
Expand Down
Loading