mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-26 20:16:00 +00:00
Merge branch 'feature/workflow-refactor'
This commit is contained in:
81
.github/workflows/build-app-beta.yaml
vendored
81
.github/workflows/build-app-beta.yaml
vendored
@@ -1,20 +1,21 @@
|
|||||||
|
# --------------------------------------------------------------------------------------------
|
||||||
|
# This file is generated. Do not edit manually
|
||||||
|
# --------------------------------------------------------------------------------------------
|
||||||
name: Electron app BETA
|
name: Electron app BETA
|
||||||
|
'on':
|
||||||
on:
|
|
||||||
push:
|
push:
|
||||||
tags:
|
tags:
|
||||||
- 'v[0-9]+.[0-9]+.[0-9]+-beta.[0-9]+'
|
- 'v[0-9]+.[0-9]+.[0-9]+-beta.[0-9]+'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: '${{ matrix.os }}'
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [macos-14, windows-2022, ubuntu-22.04]
|
os:
|
||||||
# os: [macOS-10.15]
|
- macos-14
|
||||||
|
- windows-2022
|
||||||
|
- ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- name: Install python 3.11 (MacOS)
|
- name: Install python 3.11 (MacOS)
|
||||||
if: matrix.os == 'macos-14'
|
if: matrix.os == 'macos-14'
|
||||||
@@ -23,7 +24,7 @@ jobs:
|
|||||||
echo "PYTHON=/opt/homebrew/bin/python3.11" >> $GITHUB_ENV
|
echo "PYTHON=/opt/homebrew/bin/python3.11" >> $GITHUB_ENV
|
||||||
- name: Context
|
- name: Context
|
||||||
env:
|
env:
|
||||||
GITHUB_CONTEXT: ${{ toJson(github) }}
|
GITHUB_CONTEXT: '${{ toJson(github) }}'
|
||||||
run: echo "$GITHUB_CONTEXT"
|
run: echo "$GITHUB_CONTEXT"
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
@@ -34,58 +35,52 @@ jobs:
|
|||||||
node-version: 22.x
|
node-version: 22.x
|
||||||
- name: adjustPackageJson
|
- name: adjustPackageJson
|
||||||
run: |
|
run: |
|
||||||
|
|
||||||
node adjustPackageJson --community
|
node adjustPackageJson --community
|
||||||
- name: setUpdaterChannel beta
|
- name: setUpdaterChannel beta
|
||||||
run: |
|
run: |
|
||||||
|
|
||||||
node setUpdaterChannel beta
|
node setUpdaterChannel beta
|
||||||
- name: yarn set timeout
|
- name: yarn set timeout
|
||||||
run: |
|
run: |
|
||||||
|
|
||||||
yarn config set network-timeout 100000
|
yarn config set network-timeout 100000
|
||||||
- name: yarn install
|
- name: yarn install
|
||||||
run: |
|
run: |
|
||||||
|
|
||||||
yarn install
|
yarn install
|
||||||
- name: setCurrentVersion
|
- name: setCurrentVersion
|
||||||
run: |
|
run: |
|
||||||
|
|
||||||
yarn setCurrentVersion
|
yarn setCurrentVersion
|
||||||
- name: printSecrets
|
- name: printSecrets
|
||||||
run: |
|
run: |
|
||||||
yarn printSecrets
|
|
||||||
|
yarn printSecrets
|
||||||
env:
|
env:
|
||||||
GIST_UPLOAD_SECRET : ${{secrets.GIST_UPLOAD_SECRET}}
|
GIST_UPLOAD_SECRET: '${{secrets.GIST_UPLOAD_SECRET}}'
|
||||||
- name: fillPackagedPlugins
|
- name: fillPackagedPlugins
|
||||||
run: |
|
run: |
|
||||||
|
|
||||||
yarn fillPackagedPlugins
|
yarn fillPackagedPlugins
|
||||||
- name: Install Snapcraft
|
- name: Install Snapcraft
|
||||||
if: matrix.os == 'ubuntu-22.04'
|
if: matrix.os == 'ubuntu-22.04'
|
||||||
uses: samuelmeuli/action-snapcraft@v1
|
uses: samuelmeuli/action-snapcraft@v1
|
||||||
- name: Publish
|
- name: Publish
|
||||||
run: |
|
run: |
|
||||||
|
|
||||||
yarn run build:app
|
yarn run build:app
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ secrets.GH_TOKEN }} # token for electron publish
|
GH_TOKEN: '${{ secrets.GH_TOKEN }}'
|
||||||
|
WIN_CSC_LINK: '${{ secrets.WINCERT_2025 }}'
|
||||||
WIN_CSC_LINK: ${{ secrets.WINCERT_2025 }}
|
WIN_CSC_KEY_PASSWORD: '${{ secrets.WINCERT_2025_PASSWORD }}'
|
||||||
WIN_CSC_KEY_PASSWORD: ${{ secrets.WINCERT_2025_PASSWORD }}
|
CSC_LINK: '${{ secrets.APPLECERT_CERTIFICATE }}'
|
||||||
# WIN_CSC_LINK: ${{ secrets.WINCERT_CERTIFICATE }}
|
CSC_KEY_PASSWORD: '${{ secrets.APPLECERT_PASSWORD }}'
|
||||||
# WIN_CSC_KEY_PASSWORD: ${{ secrets.WINCERT_PASSWORD }}
|
APPLE_ID: '${{ secrets.APPLE_ID }}'
|
||||||
|
APPLE_TEAM_ID: '${{ secrets.APPLE_TEAM_ID }}'
|
||||||
CSC_LINK: ${{ secrets.APPLECERT_CERTIFICATE }}
|
APPLE_ID_PASSWORD: '${{ secrets.APPLE_ID_PASSWORD }}'
|
||||||
CSC_KEY_PASSWORD: ${{ secrets.APPLECERT_PASSWORD }}
|
SNAPCRAFT_STORE_CREDENTIALS: '${{secrets.SNAPCRAFT_LOGIN}}'
|
||||||
|
APPLE_APP_SPECIFIC_PASSWORD: '${{secrets.APPLE_APP_SPECIFIC_PASSWORD}}'
|
||||||
APPLE_ID: ${{ secrets.APPLE_ID }}
|
|
||||||
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
|
|
||||||
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
|
|
||||||
|
|
||||||
SNAPCRAFT_STORE_CREDENTIALS: ${{secrets.SNAPCRAFT_LOGIN}}
|
|
||||||
APPLE_APP_SPECIFIC_PASSWORD: ${{secrets.APPLE_APP_SPECIFIC_PASSWORD}}
|
|
||||||
|
|
||||||
# - name: publishSnap
|
|
||||||
# if: matrix.os == 'ubuntu-22.04'
|
|
||||||
# run: |
|
|
||||||
# snapcraft upload --release=beta app/dist/*.snap
|
|
||||||
# env:
|
|
||||||
# SNAPCRAFT_STORE_CREDENTIALS: ${{secrets.SNAPCRAFT_LOGIN}}
|
|
||||||
|
|
||||||
- name: Copy artifacts
|
- name: Copy artifacts
|
||||||
run: |
|
run: |
|
||||||
mkdir artifacts
|
mkdir artifacts
|
||||||
@@ -97,8 +92,10 @@ jobs:
|
|||||||
cp app/dist/*win*.exe artifacts/dbgate-beta.exe || true
|
cp app/dist/*win*.exe artifacts/dbgate-beta.exe || true
|
||||||
cp app/dist/*win_x64.zip artifacts/dbgate-windows-beta.zip || true
|
cp app/dist/*win_x64.zip artifacts/dbgate-windows-beta.zip || true
|
||||||
cp app/dist/*win_arm64.zip artifacts/dbgate-windows-beta-arm64.zip || true
|
cp app/dist/*win_arm64.zip artifacts/dbgate-windows-beta-arm64.zip || true
|
||||||
cp app/dist/*-mac_x64.dmg artifacts/dbgate-beta.dmg || true
|
cp app/dist/*-mac_universal.dmg artifacts/dbgate-beta.dmg || true
|
||||||
|
cp app/dist/*-mac_x64.dmg artifacts/dbgate-beta-x64.dmg || true
|
||||||
cp app/dist/*-mac_arm64.dmg artifacts/dbgate-beta-arm64.dmg || true
|
cp app/dist/*-mac_arm64.dmg artifacts/dbgate-beta-arm64.dmg || true
|
||||||
|
mv app/dist/*.snap artifacts/dbgate-beta.snap || true
|
||||||
|
|
||||||
mv app/dist/*.exe artifacts/ || true
|
mv app/dist/*.exe artifacts/ || true
|
||||||
mv app/dist/*.zip artifacts/ || true
|
mv app/dist/*.zip artifacts/ || true
|
||||||
@@ -111,23 +108,21 @@ jobs:
|
|||||||
|
|
||||||
mv app/dist/*.yml artifacts/ || true
|
mv app/dist/*.yml artifacts/ || true
|
||||||
rm artifacts/builder-debug.yml
|
rm artifacts/builder-debug.yml
|
||||||
|
|
||||||
- name: Upload artifacts
|
- name: Upload artifacts
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: ${{ matrix.os }}
|
name: '${{ matrix.os }}'
|
||||||
path: artifacts
|
path: artifacts
|
||||||
|
|
||||||
- name: Release
|
- name: Release
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v1
|
||||||
if: startsWith(github.ref, 'refs/tags/')
|
if: 'startsWith(github.ref, ''refs/tags/'')'
|
||||||
with:
|
with:
|
||||||
files: 'artifacts/**'
|
files: artifacts/**
|
||||||
prerelease: true
|
prerelease: true
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
|
||||||
|
|
||||||
- name: Print content of notarization-error.log
|
- name: Print content of notarization-error.log
|
||||||
if: failure() && matrix.os == 'macos-14'
|
if: failure() && matrix.os == 'macos-14'
|
||||||
run: |
|
run: |
|
||||||
|
|
||||||
find . -type f -name "notarization-error.log" -exec echo "=== Start of {} ===" \; -exec cat {} \; -exec echo "=== End of {} ===" \;
|
find . -type f -name "notarization-error.log" -exec echo "=== Start of {} ===" \; -exec cat {} \; -exec echo "=== End of {} ===" \;
|
||||||
|
|||||||
90
.github/workflows/build-app-pro-beta.yaml
vendored
90
.github/workflows/build-app-pro-beta.yaml
vendored
@@ -1,23 +1,21 @@
|
|||||||
|
# --------------------------------------------------------------------------------------------
|
||||||
|
# This file is generated. Do not edit manually
|
||||||
|
# --------------------------------------------------------------------------------------------
|
||||||
name: Electron app PREMIUM BETA
|
name: Electron app PREMIUM BETA
|
||||||
|
'on':
|
||||||
on:
|
|
||||||
push:
|
push:
|
||||||
tags:
|
tags:
|
||||||
- 'v[0-9]+.[0-9]+.[0-9]+-premium-beta.[0-9]+'
|
- 'v[0-9]+.[0-9]+.[0-9]+-premium-beta.[0-9]+'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: '${{ matrix.os }}'
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
# os: [windows-2022]
|
os:
|
||||||
# os: [ubuntu-22.04]
|
- macos-14
|
||||||
# os: [windows-2022, ubuntu-22.04]
|
- windows-2022
|
||||||
os: [macos-14, windows-2022, ubuntu-22.04]
|
- ubuntu-22.04
|
||||||
# os: [macOS-10.15]
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Install python 3.11 (MacOS)
|
- name: Install python 3.11 (MacOS)
|
||||||
if: matrix.os == 'macos-14'
|
if: matrix.os == 'macos-14'
|
||||||
@@ -26,7 +24,7 @@ jobs:
|
|||||||
echo "PYTHON=/opt/homebrew/bin/python3.11" >> $GITHUB_ENV
|
echo "PYTHON=/opt/homebrew/bin/python3.11" >> $GITHUB_ENV
|
||||||
- name: Context
|
- name: Context
|
||||||
env:
|
env:
|
||||||
GITHUB_CONTEXT: ${{ toJson(github) }}
|
GITHUB_CONTEXT: '${{ toJson(github) }}'
|
||||||
run: echo "$GITHUB_CONTEXT"
|
run: echo "$GITHUB_CONTEXT"
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
@@ -35,14 +33,12 @@ jobs:
|
|||||||
uses: actions/setup-node@v1
|
uses: actions/setup-node@v1
|
||||||
with:
|
with:
|
||||||
node-version: 22.x
|
node-version: 22.x
|
||||||
|
|
||||||
- name: Checkout dbgate/dbgate-pro
|
- name: Checkout dbgate/dbgate-pro
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
repository: dbgate/dbgate-pro
|
repository: dbgate/dbgate-pro
|
||||||
token: ${{ secrets.GH_TOKEN }}
|
token: '${{ secrets.GH_TOKEN }}'
|
||||||
path: dbgate-pro
|
path: dbgate-pro
|
||||||
|
|
||||||
- name: Merge dbgate/dbgate-pro
|
- name: Merge dbgate/dbgate-pro
|
||||||
run: |
|
run: |
|
||||||
mkdir ../dbgate-pro
|
mkdir ../dbgate-pro
|
||||||
@@ -54,76 +50,82 @@ jobs:
|
|||||||
yarn
|
yarn
|
||||||
node sync.js --nowatch
|
node sync.js --nowatch
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
- name: adjustPackageJson
|
- name: adjustPackageJson
|
||||||
run: |
|
run: |
|
||||||
cd ..
|
cd ..
|
||||||
cd dbgate-merged
|
cd dbgate-merged
|
||||||
|
|
||||||
node adjustPackageJson --premium
|
node adjustPackageJson --premium
|
||||||
- name: setUpdaterChannel premium-beta
|
- name: setUpdaterChannel premium-beta
|
||||||
run: |
|
run: |
|
||||||
cd ..
|
cd ..
|
||||||
cd dbgate-merged
|
cd dbgate-merged
|
||||||
|
|
||||||
node setUpdaterChannel premium-beta
|
node setUpdaterChannel premium-beta
|
||||||
- name: yarn set timeout
|
- name: yarn set timeout
|
||||||
run: |
|
run: |
|
||||||
cd ..
|
cd ..
|
||||||
cd dbgate-merged
|
cd dbgate-merged
|
||||||
|
|
||||||
yarn config set network-timeout 100000
|
yarn config set network-timeout 100000
|
||||||
- name: yarn install
|
- name: yarn install
|
||||||
run: |
|
run: |
|
||||||
cd ..
|
cd ..
|
||||||
cd dbgate-merged
|
cd dbgate-merged
|
||||||
|
|
||||||
yarn install
|
yarn install
|
||||||
- name: setCurrentVersion
|
- name: setCurrentVersion
|
||||||
run: |
|
run: |
|
||||||
cd ..
|
cd ..
|
||||||
cd dbgate-merged
|
cd dbgate-merged
|
||||||
|
|
||||||
yarn setCurrentVersion
|
yarn setCurrentVersion
|
||||||
- name: printSecrets
|
- name: printSecrets
|
||||||
run: |
|
run: |
|
||||||
cd ..
|
cd ..
|
||||||
cd dbgate-merged
|
cd dbgate-merged
|
||||||
yarn printSecrets
|
|
||||||
|
yarn printSecrets
|
||||||
env:
|
env:
|
||||||
GIST_UPLOAD_SECRET : ${{secrets.GIST_UPLOAD_SECRET}}
|
GIST_UPLOAD_SECRET: '${{secrets.GIST_UPLOAD_SECRET}}'
|
||||||
- name: fillPackagedPlugins
|
- name: fillPackagedPlugins
|
||||||
run: |
|
run: |
|
||||||
cd ..
|
cd ..
|
||||||
cd dbgate-merged
|
cd dbgate-merged
|
||||||
|
|
||||||
yarn fillPackagedPlugins
|
yarn fillPackagedPlugins
|
||||||
- name: Publish
|
- name: Publish
|
||||||
run: |
|
run: |
|
||||||
cd ..
|
cd ..
|
||||||
cd dbgate-merged
|
cd dbgate-merged
|
||||||
|
|
||||||
yarn run build:app
|
yarn run build:app
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ secrets.GH_TOKEN }} # token for electron publish
|
GH_TOKEN: '${{ secrets.GH_TOKEN }}'
|
||||||
|
WIN_CSC_LINK: '${{ secrets.WINCERT_2025 }}'
|
||||||
WIN_CSC_LINK: ${{ secrets.WINCERT_2025 }}
|
WIN_CSC_KEY_PASSWORD: '${{ secrets.WINCERT_2025_PASSWORD }}'
|
||||||
WIN_CSC_KEY_PASSWORD: ${{ secrets.WINCERT_2025_PASSWORD }}
|
CSC_LINK: '${{ secrets.APPLECERT_CERTIFICATE }}'
|
||||||
# WIN_CSC_LINK: ${{ secrets.WINCERT_CERTIFICATE }}
|
CSC_KEY_PASSWORD: '${{ secrets.APPLECERT_PASSWORD }}'
|
||||||
# WIN_CSC_KEY_PASSWORD: ${{ secrets.WINCERT_PASSWORD }}
|
APPLE_ID: '${{ secrets.APPLE_ID }}'
|
||||||
|
APPLE_TEAM_ID: '${{ secrets.APPLE_TEAM_ID }}'
|
||||||
CSC_LINK: ${{ secrets.APPLECERT_CERTIFICATE }}
|
APPLE_ID_PASSWORD: '${{ secrets.APPLE_ID_PASSWORD }}'
|
||||||
CSC_KEY_PASSWORD: ${{ secrets.APPLECERT_PASSWORD }}
|
SNAPCRAFT_STORE_CREDENTIALS: '${{secrets.SNAPCRAFT_LOGIN}}'
|
||||||
|
APPLE_APP_SPECIFIC_PASSWORD: '${{secrets.APPLE_APP_SPECIFIC_PASSWORD}}'
|
||||||
APPLE_ID: ${{ secrets.APPLE_ID }}
|
|
||||||
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
|
|
||||||
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
|
|
||||||
|
|
||||||
APPLE_APP_SPECIFIC_PASSWORD: ${{secrets.APPLE_APP_SPECIFIC_PASSWORD}}
|
|
||||||
|
|
||||||
# DEBUG: electron-builder, electron-notarize, notarytool
|
|
||||||
|
|
||||||
|
|
||||||
- name: Copy artifacts
|
- name: Copy artifacts
|
||||||
run: |
|
run: |
|
||||||
mkdir artifacts
|
mkdir artifacts
|
||||||
|
|
||||||
|
cp ../dbgate-merged/app/dist/*.deb artifacts/dbgate-premium-beta.deb || true
|
||||||
cp ../dbgate-merged/app/dist/*x86*.AppImage artifacts/dbgate-premium-beta.AppImage || true
|
cp ../dbgate-merged/app/dist/*x86*.AppImage artifacts/dbgate-premium-beta.AppImage || true
|
||||||
|
cp ../dbgate-merged/app/dist/*arm64*.AppImage artifacts/dbgate-premium-beta-arm64.AppImage || true
|
||||||
|
cp ../dbgate-merged/app/dist/*armv7l*.AppImage artifacts/dbgate-premium-beta-armv7l.AppImage || true
|
||||||
cp ../dbgate-merged/app/dist/*win*.exe artifacts/dbgate-premium-beta.exe || true
|
cp ../dbgate-merged/app/dist/*win*.exe artifacts/dbgate-premium-beta.exe || true
|
||||||
cp ../dbgate-merged/app/dist/*-mac_x64.dmg artifacts/dbgate-premium-beta.dmg || true
|
cp ../dbgate-merged/app/dist/*win_x64.zip artifacts/dbgate-windows-premium-beta.zip || true
|
||||||
|
cp ../dbgate-merged/app/dist/*win_arm64.zip artifacts/dbgate-windows-premium-beta-arm64.zip || true
|
||||||
|
cp ../dbgate-merged/app/dist/*-mac_universal.dmg artifacts/dbgate-premium-beta.dmg || true
|
||||||
|
cp ../dbgate-merged/app/dist/*-mac_x64.dmg artifacts/dbgate-premium-beta-x64.dmg || true
|
||||||
|
cp ../dbgate-merged/app/dist/*-mac_arm64.dmg artifacts/dbgate-premium-beta-arm64.dmg || true
|
||||||
|
mv ../dbgate-merged/app/dist/*.snap artifacts/dbgate-premium-beta.snap || true
|
||||||
|
|
||||||
mv ../dbgate-merged/app/dist/*.exe artifacts/ || true
|
mv ../dbgate-merged/app/dist/*.exe artifacts/ || true
|
||||||
mv ../dbgate-merged/app/dist/*.zip artifacts/ || true
|
mv ../dbgate-merged/app/dist/*.zip artifacts/ || true
|
||||||
@@ -136,25 +138,23 @@ jobs:
|
|||||||
|
|
||||||
mv ../dbgate-merged/app/dist/*.yml artifacts/ || true
|
mv ../dbgate-merged/app/dist/*.yml artifacts/ || true
|
||||||
rm artifacts/builder-debug.yml
|
rm artifacts/builder-debug.yml
|
||||||
|
|
||||||
- name: Upload artifacts
|
- name: Upload artifacts
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: ${{ matrix.os }}
|
name: '${{ matrix.os }}'
|
||||||
path: artifacts
|
path: artifacts
|
||||||
|
|
||||||
- name: Release
|
- name: Release
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v1
|
||||||
if: startsWith(github.ref, 'refs/tags/')
|
if: 'startsWith(github.ref, ''refs/tags/'')'
|
||||||
with:
|
with:
|
||||||
files: 'artifacts/**'
|
files: artifacts/**
|
||||||
prerelease: true
|
prerelease: true
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
|
||||||
|
|
||||||
- name: Print content of notarization-error.log
|
- name: Print content of notarization-error.log
|
||||||
if: failure() && matrix.os == 'macos-14'
|
if: failure() && matrix.os == 'macos-14'
|
||||||
run: |
|
run: |
|
||||||
cd ..
|
cd ..
|
||||||
cd dbgate-merged
|
cd dbgate-merged
|
||||||
|
|
||||||
find . -type f -name "notarization-error.log" -exec echo "=== Start of {} ===" \; -exec cat {} \; -exec echo "=== End of {} ===" \;
|
find . -type f -name "notarization-error.log" -exec echo "=== Start of {} ===" \; -exec cat {} \; -exec echo "=== End of {} ===" \;
|
||||||
|
|||||||
93
.github/workflows/build-app-pro.yaml
vendored
93
.github/workflows/build-app-pro.yaml
vendored
@@ -1,24 +1,21 @@
|
|||||||
|
# --------------------------------------------------------------------------------------------
|
||||||
|
# This file is generated. Do not edit manually
|
||||||
|
# --------------------------------------------------------------------------------------------
|
||||||
name: Electron app PREMIUM
|
name: Electron app PREMIUM
|
||||||
|
'on':
|
||||||
on:
|
|
||||||
push:
|
push:
|
||||||
tags:
|
tags:
|
||||||
- 'v[0-9]+.[0-9]+.[0-9]+'
|
- 'v[0-9]+.[0-9]+.[0-9]+'
|
||||||
# - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
|
|
||||||
|
|
||||||
# branches:
|
|
||||||
# - production
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: '${{ matrix.os }}'
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
# os: [ubuntu-22.04, windows-2016]
|
os:
|
||||||
os: [macos-14, windows-2022, ubuntu-22.04]
|
- macos-14
|
||||||
|
- windows-2022
|
||||||
|
- ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- name: Install python 3.11 (MacOS)
|
- name: Install python 3.11 (MacOS)
|
||||||
if: matrix.os == 'macos-14'
|
if: matrix.os == 'macos-14'
|
||||||
@@ -27,7 +24,7 @@ jobs:
|
|||||||
echo "PYTHON=/opt/homebrew/bin/python3.11" >> $GITHUB_ENV
|
echo "PYTHON=/opt/homebrew/bin/python3.11" >> $GITHUB_ENV
|
||||||
- name: Context
|
- name: Context
|
||||||
env:
|
env:
|
||||||
GITHUB_CONTEXT: ${{ toJson(github) }}
|
GITHUB_CONTEXT: '${{ toJson(github) }}'
|
||||||
run: echo "$GITHUB_CONTEXT"
|
run: echo "$GITHUB_CONTEXT"
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
@@ -36,14 +33,12 @@ jobs:
|
|||||||
uses: actions/setup-node@v1
|
uses: actions/setup-node@v1
|
||||||
with:
|
with:
|
||||||
node-version: 22.x
|
node-version: 22.x
|
||||||
|
|
||||||
- name: Checkout dbgate/dbgate-pro
|
- name: Checkout dbgate/dbgate-pro
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
repository: dbgate/dbgate-pro
|
repository: dbgate/dbgate-pro
|
||||||
token: ${{ secrets.GH_TOKEN }}
|
token: '${{ secrets.GH_TOKEN }}'
|
||||||
path: dbgate-pro
|
path: dbgate-pro
|
||||||
|
|
||||||
- name: Merge dbgate/dbgate-pro
|
- name: Merge dbgate/dbgate-pro
|
||||||
run: |
|
run: |
|
||||||
mkdir ../dbgate-pro
|
mkdir ../dbgate-pro
|
||||||
@@ -55,99 +50,111 @@ jobs:
|
|||||||
yarn
|
yarn
|
||||||
node sync.js --nowatch
|
node sync.js --nowatch
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
- name: adjustPackageJson
|
- name: adjustPackageJson
|
||||||
run: |
|
run: |
|
||||||
cd ..
|
cd ..
|
||||||
cd dbgate-merged
|
cd dbgate-merged
|
||||||
|
|
||||||
node adjustPackageJson --premium
|
node adjustPackageJson --premium
|
||||||
- name: setUpdaterChannel premium
|
- name: setUpdaterChannel premium
|
||||||
run: |
|
run: |
|
||||||
cd ..
|
cd ..
|
||||||
cd dbgate-merged
|
cd dbgate-merged
|
||||||
|
|
||||||
node setUpdaterChannel premium
|
node setUpdaterChannel premium
|
||||||
- name: yarn set timeout
|
- name: yarn set timeout
|
||||||
run: |
|
run: |
|
||||||
cd ..
|
cd ..
|
||||||
cd dbgate-merged
|
cd dbgate-merged
|
||||||
|
|
||||||
yarn config set network-timeout 100000
|
yarn config set network-timeout 100000
|
||||||
- name: yarn install
|
- name: yarn install
|
||||||
run: |
|
run: |
|
||||||
cd ..
|
cd ..
|
||||||
cd dbgate-merged
|
cd dbgate-merged
|
||||||
|
|
||||||
yarn install
|
yarn install
|
||||||
- name: setCurrentVersion
|
- name: setCurrentVersion
|
||||||
run: |
|
run: |
|
||||||
cd ..
|
cd ..
|
||||||
cd dbgate-merged
|
cd dbgate-merged
|
||||||
|
|
||||||
yarn setCurrentVersion
|
yarn setCurrentVersion
|
||||||
- name: printSecrets
|
- name: printSecrets
|
||||||
run: |
|
run: |
|
||||||
cd ..
|
cd ..
|
||||||
cd dbgate-merged
|
cd dbgate-merged
|
||||||
|
|
||||||
yarn printSecrets
|
yarn printSecrets
|
||||||
env:
|
env:
|
||||||
GIST_UPLOAD_SECRET : ${{secrets.GIST_UPLOAD_SECRET}}
|
GIST_UPLOAD_SECRET: '${{secrets.GIST_UPLOAD_SECRET}}'
|
||||||
- name: fillPackagedPlugins
|
- name: fillPackagedPlugins
|
||||||
run: |
|
run: |
|
||||||
cd ..
|
cd ..
|
||||||
cd dbgate-merged
|
cd dbgate-merged
|
||||||
|
|
||||||
yarn fillPackagedPlugins
|
yarn fillPackagedPlugins
|
||||||
- name: Publish
|
- name: Publish
|
||||||
run: |
|
run: |
|
||||||
cd ..
|
cd ..
|
||||||
cd dbgate-merged
|
cd dbgate-merged
|
||||||
|
|
||||||
yarn run build:app
|
yarn run build:app
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ secrets.GH_TOKEN }} # token for electron publish
|
GH_TOKEN: '${{ secrets.GH_TOKEN }}'
|
||||||
|
WIN_CSC_LINK: '${{ secrets.WINCERT_2025 }}'
|
||||||
WIN_CSC_LINK: ${{ secrets.WINCERT_2025 }}
|
WIN_CSC_KEY_PASSWORD: '${{ secrets.WINCERT_2025_PASSWORD }}'
|
||||||
WIN_CSC_KEY_PASSWORD: ${{ secrets.WINCERT_2025_PASSWORD }}
|
CSC_LINK: '${{ secrets.APPLECERT_CERTIFICATE }}'
|
||||||
# WIN_CSC_LINK: ${{ secrets.WINCERT_CERTIFICATE }}
|
CSC_KEY_PASSWORD: '${{ secrets.APPLECERT_PASSWORD }}'
|
||||||
# WIN_CSC_KEY_PASSWORD: ${{ secrets.WINCERT_PASSWORD }}
|
APPLE_ID: '${{ secrets.APPLE_ID }}'
|
||||||
|
APPLE_TEAM_ID: '${{ secrets.APPLE_TEAM_ID }}'
|
||||||
CSC_LINK: ${{ secrets.APPLECERT_CERTIFICATE }}
|
APPLE_ID_PASSWORD: '${{ secrets.APPLE_ID_PASSWORD }}'
|
||||||
CSC_KEY_PASSWORD: ${{ secrets.APPLECERT_PASSWORD }}
|
SNAPCRAFT_STORE_CREDENTIALS: '${{secrets.SNAPCRAFT_LOGIN}}'
|
||||||
|
APPLE_APP_SPECIFIC_PASSWORD: '${{secrets.APPLE_APP_SPECIFIC_PASSWORD}}'
|
||||||
APPLE_ID: ${{ secrets.APPLE_ID }}
|
|
||||||
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
|
|
||||||
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
|
|
||||||
|
|
||||||
APPLE_APP_SPECIFIC_PASSWORD: ${{secrets.APPLE_APP_SPECIFIC_PASSWORD}}
|
|
||||||
|
|
||||||
- name: Copy artifacts
|
- name: Copy artifacts
|
||||||
run: |
|
run: |
|
||||||
mkdir artifacts
|
mkdir artifacts
|
||||||
|
|
||||||
|
cp ../dbgate-merged/app/dist/*.deb artifacts/dbgate-premium-latest.deb || true
|
||||||
cp ../dbgate-merged/app/dist/*x86*.AppImage artifacts/dbgate-premium-latest.AppImage || true
|
cp ../dbgate-merged/app/dist/*x86*.AppImage artifacts/dbgate-premium-latest.AppImage || true
|
||||||
cp ../dbgate-merged/app/dist/*.exe artifacts/dbgate-premium-latest.exe || true
|
cp ../dbgate-merged/app/dist/*arm64*.AppImage artifacts/dbgate-premium-latest-arm64.AppImage || true
|
||||||
cp ../dbgate-merged/app/dist/*win_x64.zip artifacts/dbgate-premium-windows-latest.zip || true
|
cp ../dbgate-merged/app/dist/*armv7l*.AppImage artifacts/dbgate-premium-latest-armv7l.AppImage || true
|
||||||
cp ../dbgate-merged/app/dist/*win_arm64.zip artifacts/dbgate-premium-windows-latest-arm64.zip || true
|
cp ../dbgate-merged/app/dist/*win*.exe artifacts/dbgate-premium-latest.exe || true
|
||||||
|
cp ../dbgate-merged/app/dist/*win_x64.zip artifacts/dbgate-windows-premium-latest.zip || true
|
||||||
|
cp ../dbgate-merged/app/dist/*win_arm64.zip artifacts/dbgate-windows-premium-latest-arm64.zip || true
|
||||||
cp ../dbgate-merged/app/dist/*-mac_universal.dmg artifacts/dbgate-premium-latest.dmg || true
|
cp ../dbgate-merged/app/dist/*-mac_universal.dmg artifacts/dbgate-premium-latest.dmg || true
|
||||||
cp ../dbgate-merged/app/dist/*-mac_x64.dmg artifacts/dbgate-premium-latest-x64.dmg || true
|
cp ../dbgate-merged/app/dist/*-mac_x64.dmg artifacts/dbgate-premium-latest-x64.dmg || true
|
||||||
cp ../dbgate-merged/app/dist/*-mac_arm64.dmg artifacts/dbgate-premium-latest-arm64.dmg || true
|
cp ../dbgate-merged/app/dist/*-mac_arm64.dmg artifacts/dbgate-premium-latest-arm64.dmg || true
|
||||||
|
mv ../dbgate-merged/app/dist/*.snap artifacts/dbgate-premium-latest.snap || true
|
||||||
|
|
||||||
mv ../dbgate-merged/app/dist/*.exe artifacts/ || true
|
mv ../dbgate-merged/app/dist/*.exe artifacts/ || true
|
||||||
mv ../dbgate-merged/app/dist/*.zip artifacts/ || true
|
mv ../dbgate-merged/app/dist/*.zip artifacts/ || true
|
||||||
mv ../dbgate-merged/app/dist/*.tar.gz artifacts/ || true
|
mv ../dbgate-merged/app/dist/*.tar.gz artifacts/ || true
|
||||||
mv ../dbgate-merged/app/dist/*.AppImage artifacts/ || true
|
mv ../dbgate-merged/app/dist/*.AppImage artifacts/ || true
|
||||||
mv ../dbgate-merged/app/dist/*.deb artifacts/ || true
|
mv ../dbgate-merged/app/dist/*.deb artifacts/ || true
|
||||||
|
mv ../dbgate-merged/app/dist/*.snap artifacts/ || true
|
||||||
mv ../dbgate-merged/app/dist/*.dmg artifacts/ || true
|
mv ../dbgate-merged/app/dist/*.dmg artifacts/ || true
|
||||||
mv ../dbgate-merged/app/dist/*.blockmap artifacts/ || true
|
mv ../dbgate-merged/app/dist/*.blockmap artifacts/ || true
|
||||||
|
|
||||||
mv ../dbgate-merged/app/dist/*.yml artifacts/ || true
|
mv ../dbgate-merged/app/dist/*.yml artifacts/ || true
|
||||||
rm artifacts/builder-debug.yml
|
rm artifacts/builder-debug.yml
|
||||||
|
|
||||||
- name: Upload artifacts
|
- name: Upload artifacts
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: ${{ matrix.os }}
|
name: '${{ matrix.os }}'
|
||||||
path: artifacts
|
path: artifacts
|
||||||
|
|
||||||
- name: Release
|
- name: Release
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v1
|
||||||
if: startsWith(github.ref, 'refs/tags/')
|
if: 'startsWith(github.ref, ''refs/tags/'')'
|
||||||
with:
|
with:
|
||||||
files: 'artifacts/**'
|
files: artifacts/**
|
||||||
|
prerelease: false
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
|
||||||
|
- name: Print content of notarization-error.log
|
||||||
|
if: failure() && matrix.os == 'macos-14'
|
||||||
|
run: |
|
||||||
|
cd ..
|
||||||
|
cd dbgate-merged
|
||||||
|
|
||||||
|
find . -type f -name "notarization-error.log" -exec echo "=== Start of {} ===" \; -exec cat {} \; -exec echo "=== End of {} ===" \;
|
||||||
|
|||||||
126
.github/workflows/build-app.yaml
vendored
126
.github/workflows/build-app.yaml
vendored
@@ -1,24 +1,21 @@
|
|||||||
|
# --------------------------------------------------------------------------------------------
|
||||||
|
# This file is generated. Do not edit manually
|
||||||
|
# --------------------------------------------------------------------------------------------
|
||||||
name: Electron app
|
name: Electron app
|
||||||
|
'on':
|
||||||
on:
|
|
||||||
push:
|
push:
|
||||||
tags:
|
tags:
|
||||||
- 'v[0-9]+.[0-9]+.[0-9]+'
|
- 'v[0-9]+.[0-9]+.[0-9]+'
|
||||||
# - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
|
|
||||||
|
|
||||||
# branches:
|
|
||||||
# - production
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: '${{ matrix.os }}'
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
# os: [ubuntu-22.04, windows-2016]
|
os:
|
||||||
os: [macos-14, windows-2022, ubuntu-22.04]
|
- macos-14
|
||||||
|
- windows-2022
|
||||||
|
- ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- name: Install python 3.11 (MacOS)
|
- name: Install python 3.11 (MacOS)
|
||||||
if: matrix.os == 'macos-14'
|
if: matrix.os == 'macos-14'
|
||||||
@@ -27,7 +24,7 @@ jobs:
|
|||||||
echo "PYTHON=/opt/homebrew/bin/python3.11" >> $GITHUB_ENV
|
echo "PYTHON=/opt/homebrew/bin/python3.11" >> $GITHUB_ENV
|
||||||
- name: Context
|
- name: Context
|
||||||
env:
|
env:
|
||||||
GITHUB_CONTEXT: ${{ toJson(github) }}
|
GITHUB_CONTEXT: '${{ toJson(github) }}'
|
||||||
run: echo "$GITHUB_CONTEXT"
|
run: echo "$GITHUB_CONTEXT"
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
@@ -38,61 +35,51 @@ jobs:
|
|||||||
node-version: 22.x
|
node-version: 22.x
|
||||||
- name: adjustPackageJson
|
- name: adjustPackageJson
|
||||||
run: |
|
run: |
|
||||||
|
|
||||||
node adjustPackageJson --community
|
node adjustPackageJson --community
|
||||||
- name: yarn set timeout
|
- name: yarn set timeout
|
||||||
run: |
|
run: |
|
||||||
|
|
||||||
yarn config set network-timeout 100000
|
yarn config set network-timeout 100000
|
||||||
- name: yarn install
|
- name: yarn install
|
||||||
run: |
|
run: |
|
||||||
# yarn --version
|
|
||||||
# yarn config set network-timeout 300000
|
|
||||||
yarn install
|
yarn install
|
||||||
- name: setCurrentVersion
|
- name: setCurrentVersion
|
||||||
run: |
|
run: |
|
||||||
|
|
||||||
yarn setCurrentVersion
|
yarn setCurrentVersion
|
||||||
- name: printSecrets
|
- name: printSecrets
|
||||||
run: |
|
run: |
|
||||||
yarn printSecrets
|
|
||||||
|
yarn printSecrets
|
||||||
env:
|
env:
|
||||||
GIST_UPLOAD_SECRET : ${{secrets.GIST_UPLOAD_SECRET}}
|
GIST_UPLOAD_SECRET: '${{secrets.GIST_UPLOAD_SECRET}}'
|
||||||
- name: fillPackagedPlugins
|
- name: fillPackagedPlugins
|
||||||
run: |
|
run: |
|
||||||
|
|
||||||
yarn fillPackagedPlugins
|
yarn fillPackagedPlugins
|
||||||
- name: Install Snapcraft
|
- name: Install Snapcraft
|
||||||
if: matrix.os == 'ubuntu-22.04'
|
if: matrix.os == 'ubuntu-22.04'
|
||||||
uses: samuelmeuli/action-snapcraft@v1
|
uses: samuelmeuli/action-snapcraft@v1
|
||||||
- name: Publish
|
- name: Publish
|
||||||
run: |
|
run: |
|
||||||
|
|
||||||
yarn run build:app
|
yarn run build:app
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ secrets.GH_TOKEN }} # token for electron publish
|
GH_TOKEN: '${{ secrets.GH_TOKEN }}'
|
||||||
|
WIN_CSC_LINK: '${{ secrets.WINCERT_2025 }}'
|
||||||
WIN_CSC_LINK: ${{ secrets.WINCERT_2025 }}
|
WIN_CSC_KEY_PASSWORD: '${{ secrets.WINCERT_2025_PASSWORD }}'
|
||||||
WIN_CSC_KEY_PASSWORD: ${{ secrets.WINCERT_2025_PASSWORD }}
|
CSC_LINK: '${{ secrets.APPLECERT_CERTIFICATE }}'
|
||||||
# WIN_CSC_LINK: ${{ secrets.WINCERT_CERTIFICATE }}
|
CSC_KEY_PASSWORD: '${{ secrets.APPLECERT_PASSWORD }}'
|
||||||
# WIN_CSC_KEY_PASSWORD: ${{ secrets.WINCERT_PASSWORD }}
|
APPLE_ID: '${{ secrets.APPLE_ID }}'
|
||||||
|
APPLE_TEAM_ID: '${{ secrets.APPLE_TEAM_ID }}'
|
||||||
CSC_LINK: ${{ secrets.APPLECERT_CERTIFICATE }}
|
APPLE_ID_PASSWORD: '${{ secrets.APPLE_ID_PASSWORD }}'
|
||||||
CSC_KEY_PASSWORD: ${{ secrets.APPLECERT_PASSWORD }}
|
SNAPCRAFT_STORE_CREDENTIALS: '${{secrets.SNAPCRAFT_LOGIN}}'
|
||||||
|
APPLE_APP_SPECIFIC_PASSWORD: '${{secrets.APPLE_APP_SPECIFIC_PASSWORD}}'
|
||||||
APPLE_ID: ${{ secrets.APPLE_ID }}
|
|
||||||
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
|
|
||||||
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
|
|
||||||
|
|
||||||
SNAPCRAFT_STORE_CREDENTIALS: ${{secrets.SNAPCRAFT_LOGIN}}
|
|
||||||
APPLE_APP_SPECIFIC_PASSWORD: ${{secrets.APPLE_APP_SPECIFIC_PASSWORD}}
|
|
||||||
|
|
||||||
- name: generatePadFile
|
- name: generatePadFile
|
||||||
run: |
|
run: |
|
||||||
yarn generatePadFile
|
yarn generatePadFile
|
||||||
|
|
||||||
# - name: publishSnap
|
|
||||||
# if: matrix.os == 'ubuntu-22.04'
|
|
||||||
# run: |
|
|
||||||
# snapcraft upload --release=stable app/dist/*.snap
|
|
||||||
# env:
|
|
||||||
# SNAPCRAFT_STORE_CREDENTIALS: ${{secrets.SNAPCRAFT_LOGIN}}
|
|
||||||
|
|
||||||
- name: Copy artifacts
|
- name: Copy artifacts
|
||||||
run: |
|
run: |
|
||||||
mkdir artifacts
|
mkdir artifacts
|
||||||
@@ -101,75 +88,44 @@ jobs:
|
|||||||
cp app/dist/*x86*.AppImage artifacts/dbgate-latest.AppImage || true
|
cp app/dist/*x86*.AppImage artifacts/dbgate-latest.AppImage || true
|
||||||
cp app/dist/*arm64*.AppImage artifacts/dbgate-latest-arm64.AppImage || true
|
cp app/dist/*arm64*.AppImage artifacts/dbgate-latest-arm64.AppImage || true
|
||||||
cp app/dist/*armv7l*.AppImage artifacts/dbgate-latest-armv7l.AppImage || true
|
cp app/dist/*armv7l*.AppImage artifacts/dbgate-latest-armv7l.AppImage || true
|
||||||
cp app/dist/*.exe artifacts/dbgate-latest.exe || true
|
cp app/dist/*win*.exe artifacts/dbgate-latest.exe || true
|
||||||
cp app/dist/*win_x64.zip artifacts/dbgate-windows-latest.zip || true
|
cp app/dist/*win_x64.zip artifacts/dbgate-windows-latest.zip || true
|
||||||
cp app/dist/*win_arm64.zip artifacts/dbgate-windows-latest-arm64.zip || true
|
cp app/dist/*win_arm64.zip artifacts/dbgate-windows-latest-arm64.zip || true
|
||||||
cp app/dist/*-mac_universal.dmg artifacts/dbgate-latest.dmg || true
|
cp app/dist/*-mac_universal.dmg artifacts/dbgate-latest.dmg || true
|
||||||
cp app/dist/*-mac_x64.dmg artifacts/dbgate-latest-x64.dmg || true
|
cp app/dist/*-mac_x64.dmg artifacts/dbgate-latest-x64.dmg || true
|
||||||
cp app/dist/*-mac_arm64.dmg artifacts/dbgate-latest-arm64.dmg || true
|
cp app/dist/*-mac_arm64.dmg artifacts/dbgate-latest-arm64.dmg || true
|
||||||
|
mv app/dist/*.snap artifacts/dbgate-latest.snap || true
|
||||||
|
|
||||||
mv app/dist/*.exe artifacts/ || true
|
mv app/dist/*.exe artifacts/ || true
|
||||||
mv app/dist/*.zip artifacts/ || true
|
mv app/dist/*.zip artifacts/ || true
|
||||||
mv app/dist/*.tar.gz artifacts/ || true
|
mv app/dist/*.tar.gz artifacts/ || true
|
||||||
mv app/dist/*.AppImage artifacts/ || true
|
mv app/dist/*.AppImage artifacts/ || true
|
||||||
mv app/dist/*.deb artifacts/ || true
|
mv app/dist/*.deb artifacts/ || true
|
||||||
|
mv app/dist/*.snap artifacts/ || true
|
||||||
mv app/dist/*.dmg artifacts/ || true
|
mv app/dist/*.dmg artifacts/ || true
|
||||||
mv app/dist/*.snap artifacts/dbgate-latest.snap || true
|
|
||||||
mv app/dist/*.blockmap artifacts/ || true
|
mv app/dist/*.blockmap artifacts/ || true
|
||||||
|
|
||||||
mv app/dist/*.yml artifacts/ || true
|
mv app/dist/*.yml artifacts/ || true
|
||||||
rm artifacts/builder-debug.yml
|
rm artifacts/builder-debug.yml
|
||||||
|
|
||||||
# - name: Copy artifacts Linux, MacOs
|
|
||||||
# if: matrix.os != 'windows-2016'
|
|
||||||
# run: |
|
|
||||||
# mkdir artifacts
|
|
||||||
|
|
||||||
# cp app/dist/*.AppImage artifacts/ || true
|
|
||||||
# cp app/dist/*.dmg artifacts/ || true
|
|
||||||
# cp app/dist/*.deb artifacts/ || true
|
|
||||||
|
|
||||||
# mv app/dist/*.deb artifacts/dbgate-linux.deb || true
|
|
||||||
# mv app/dist/*.AppImage artifacts/dbgate-linux.AppImage || true
|
|
||||||
# mv app/dist/*.dmg artifacts/dbgate-mac.dmg || true
|
|
||||||
|
|
||||||
# - name: Copy artifacts Win
|
|
||||||
# if: matrix.os == 'windows-2016'
|
|
||||||
# run: |
|
|
||||||
# mkdir artifacts
|
|
||||||
|
|
||||||
# cp app/dist/*.exe artifacts/ || true
|
|
||||||
|
|
||||||
# mv app/dist/*.exe artifacts/dbgate-windows.exe
|
|
||||||
|
|
||||||
# mv app/dist/latest.yml artifacts/latest.yml || true
|
|
||||||
|
|
||||||
- name: Copy PAD file
|
- name: Copy PAD file
|
||||||
if: matrix.os == 'windows-2022'
|
if: matrix.os == 'windows-2022'
|
||||||
run: |
|
run: |
|
||||||
mv app/dist/dbgate-pad.xml artifacts/ || true
|
mv app/dist/dbgate-pad.xml artifacts/ || true
|
||||||
|
|
||||||
- name: Upload artifacts
|
- name: Upload artifacts
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: ${{ matrix.os }}
|
name: '${{ matrix.os }}'
|
||||||
path: artifacts
|
path: artifacts
|
||||||
|
|
||||||
- name: Release
|
- name: Release
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v1
|
||||||
if: startsWith(github.ref, 'refs/tags/')
|
if: 'startsWith(github.ref, ''refs/tags/'')'
|
||||||
with:
|
with:
|
||||||
files: 'artifacts/**'
|
files: artifacts/**
|
||||||
|
prerelease: false
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
|
||||||
|
- name: Print content of notarization-error.log
|
||||||
|
if: failure() && matrix.os == 'macos-14'
|
||||||
|
run: |
|
||||||
|
|
||||||
# - name: Create Release
|
find . -type f -name "notarization-error.log" -exec echo "=== Start of {} ===" \; -exec cat {} \; -exec echo "=== End of {} ===" \;
|
||||||
# id: create_release
|
|
||||||
# uses: actions/create-release@v1
|
|
||||||
# env:
|
|
||||||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
# with:
|
|
||||||
# tag_name: ${{ github.ref }}
|
|
||||||
# release_name: Release ${{ github.ref }}
|
|
||||||
# draft: false
|
|
||||||
# prerelease: false
|
|
||||||
|
|||||||
71
.github/workflows/build-aws-pro-beta.yaml
vendored
71
.github/workflows/build-aws-pro-beta.yaml
vendored
@@ -1,47 +1,41 @@
|
|||||||
|
# --------------------------------------------------------------------------------------------
|
||||||
|
# This file is generated. Do not edit manually
|
||||||
|
# --------------------------------------------------------------------------------------------
|
||||||
name: AWS image PREMIUM
|
name: AWS image PREMIUM
|
||||||
|
'on':
|
||||||
on:
|
|
||||||
push:
|
push:
|
||||||
tags:
|
tags:
|
||||||
- 'v[0-9]+.[0-9]+.[0-9]+'
|
- 'v[0-9]+.[0-9]+.[0-9]+'
|
||||||
# - 'v[0-9]+.[0-9]+.[0-9]+-premium-beta.[0-9]+'
|
|
||||||
- 'v[0-9]+.[0-9]+.[0-9]+-packer-beta.[0-9]+'
|
- 'v[0-9]+.[0-9]+.[0-9]+-packer-beta.[0-9]+'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
runs-on: '${{ matrix.os }}'
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-22.04]
|
os:
|
||||||
|
- ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- name: Context
|
- name: Context
|
||||||
env:
|
env:
|
||||||
GITHUB_CONTEXT: ${{ toJson(github) }}
|
GITHUB_CONTEXT: '${{ toJson(github) }}'
|
||||||
run: echo "$GITHUB_CONTEXT"
|
run: echo "$GITHUB_CONTEXT"
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
fetch-depth: 1
|
fetch-depth: 1
|
||||||
|
|
||||||
- name: Use Node.js 18.x
|
- name: Use Node.js 18.x
|
||||||
uses: actions/setup-node@v1
|
uses: actions/setup-node@v1
|
||||||
with:
|
with:
|
||||||
node-version: 18.x
|
node-version: 18.x
|
||||||
|
|
||||||
- name: Setup `packer`
|
- name: Setup `packer`
|
||||||
uses: hashicorp/setup-packer@main
|
uses: hashicorp/setup-packer@main
|
||||||
with:
|
with:
|
||||||
version: latest
|
version: latest
|
||||||
|
|
||||||
- name: Checkout dbgate/dbgate-pro
|
- name: Checkout dbgate/dbgate-pro
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
repository: dbgate/dbgate-pro
|
repository: dbgate/dbgate-pro
|
||||||
token: ${{ secrets.GH_TOKEN }}
|
token: '${{ secrets.GH_TOKEN }}'
|
||||||
path: dbgate-pro
|
path: dbgate-pro
|
||||||
|
|
||||||
- name: Merge dbgate/dbgate-pro
|
- name: Merge dbgate/dbgate-pro
|
||||||
run: |
|
run: |
|
||||||
mkdir ../dbgate-pro
|
mkdir ../dbgate-pro
|
||||||
@@ -53,33 +47,28 @@ jobs:
|
|||||||
yarn
|
yarn
|
||||||
node sync.js --nowatch
|
node sync.js --nowatch
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
- name: adjustPackageJson
|
- name: adjustPackageJson
|
||||||
run: |
|
run: |
|
||||||
cd ..
|
cd ..
|
||||||
cd dbgate-merged
|
cd dbgate-merged
|
||||||
node adjustPackageJson --premium
|
node adjustPackageJson --premium
|
||||||
|
|
||||||
- name: yarn install
|
- name: yarn install
|
||||||
run: |
|
run: |
|
||||||
cd ..
|
cd ..
|
||||||
cd dbgate-merged
|
cd dbgate-merged
|
||||||
yarn install
|
yarn install
|
||||||
|
|
||||||
- name: setCurrentVersion
|
- name: setCurrentVersion
|
||||||
run: |
|
run: |
|
||||||
cd ..
|
cd ..
|
||||||
cd dbgate-merged
|
cd dbgate-merged
|
||||||
yarn setCurrentVersion
|
yarn setCurrentVersion
|
||||||
|
|
||||||
- name: printSecrets
|
- name: printSecrets
|
||||||
run: |
|
run: |
|
||||||
cd ..
|
cd ..
|
||||||
cd dbgate-merged
|
cd dbgate-merged
|
||||||
yarn printSecrets
|
yarn printSecrets
|
||||||
env:
|
env:
|
||||||
GIST_UPLOAD_SECRET : ${{secrets.GIST_UPLOAD_SECRET}}
|
GIST_UPLOAD_SECRET: '${{secrets.GIST_UPLOAD_SECRET}}'
|
||||||
|
|
||||||
- name: Prepare packer build
|
- name: Prepare packer build
|
||||||
run: |
|
run: |
|
||||||
cd ..
|
cd ..
|
||||||
@@ -87,62 +76,48 @@ jobs:
|
|||||||
yarn run prepare:packer
|
yarn run prepare:packer
|
||||||
cd packer
|
cd packer
|
||||||
zip -r cloud-build.zip build
|
zip -r cloud-build.zip build
|
||||||
|
|
||||||
- name: Copy artifacts
|
- name: Copy artifacts
|
||||||
run: |
|
run: |
|
||||||
mkdir artifacts
|
mkdir artifacts
|
||||||
cp ../dbgate-merged/packer/cloud-build.zip artifacts/cloud-build.zip || true
|
cp ../dbgate-merged/packer/cloud-build.zip artifacts/cloud-build.zip || true
|
||||||
|
|
||||||
- name: Upload artifacts
|
- name: Upload artifacts
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: ${{ matrix.os }}
|
name: '${{ matrix.os }}'
|
||||||
path: artifacts
|
path: artifacts
|
||||||
|
|
||||||
- name: Release
|
- name: Release
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v1
|
||||||
if: startsWith(github.ref, 'refs/tags/')
|
if: 'startsWith(github.ref, ''refs/tags/'')'
|
||||||
with:
|
with:
|
||||||
files: 'artifacts/**'
|
files: artifacts/**
|
||||||
prerelease: true
|
prerelease: true
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
|
||||||
|
|
||||||
- name: Run `packer init`
|
- name: Run `packer init`
|
||||||
run: |
|
run: |
|
||||||
cd ../dbgate-merged/packer
|
cd ../dbgate-merged/packer
|
||||||
packer init ./aws-ubuntu.pkr.hcl
|
packer init ./aws-ubuntu.pkr.hcl
|
||||||
env:
|
env:
|
||||||
AWS_ACCESS_KEY_ID: ${{secrets.AWS_ACCESS_KEY_ID}}
|
AWS_ACCESS_KEY_ID: '${{secrets.AWS_ACCESS_KEY_ID}}'
|
||||||
AWS_SECRET_ACCESS_KEY: ${{secrets.AWS_SECRET_ACCESS_KEY}}
|
AWS_SECRET_ACCESS_KEY: '${{secrets.AWS_SECRET_ACCESS_KEY}}'
|
||||||
AWS_DEFAULT_REGION: ${{secrets.AWS_DEFAULT_REGION}}
|
AWS_DEFAULT_REGION: '${{secrets.AWS_DEFAULT_REGION}}'
|
||||||
|
|
||||||
- name: Run `packer build`
|
- name: Run `packer build`
|
||||||
run: |
|
run: |
|
||||||
cd ../dbgate-merged/packer
|
cd ../dbgate-merged/packer
|
||||||
packer build ./aws-ubuntu.pkr.hcl
|
packer build ./aws-ubuntu.pkr.hcl
|
||||||
env:
|
env:
|
||||||
AWS_ACCESS_KEY_ID: ${{secrets.AWS_ACCESS_KEY_ID}}
|
AWS_ACCESS_KEY_ID: '${{secrets.AWS_ACCESS_KEY_ID}}'
|
||||||
AWS_SECRET_ACCESS_KEY: ${{secrets.AWS_SECRET_ACCESS_KEY}}
|
AWS_SECRET_ACCESS_KEY: '${{secrets.AWS_SECRET_ACCESS_KEY}}'
|
||||||
AWS_DEFAULT_REGION: ${{secrets.AWS_DEFAULT_REGION}}
|
AWS_DEFAULT_REGION: '${{secrets.AWS_DEFAULT_REGION}}'
|
||||||
|
|
||||||
# - name: Install AWS CLI
|
|
||||||
# run: |
|
|
||||||
# curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
|
|
||||||
# unzip awscliv2.zip
|
|
||||||
# sudo ./aws/install
|
|
||||||
# sudo apt-get install jq -y
|
|
||||||
|
|
||||||
- name: Install jq
|
- name: Install jq
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get install jq -y
|
sudo apt-get install jq -y
|
||||||
|
|
||||||
- name: Delete old AMIs
|
- name: Delete old AMIs
|
||||||
run: |
|
run: |
|
||||||
cd ../dbgate-merged/packer
|
cd ../dbgate-merged/packer
|
||||||
chmod +x delete-old-amis.sh
|
chmod +x delete-old-amis.sh
|
||||||
./delete-old-amis.sh
|
./delete-old-amis.sh
|
||||||
env:
|
env:
|
||||||
AWS_ACCESS_KEY_ID: ${{secrets.AWS_ACCESS_KEY_ID}}
|
AWS_ACCESS_KEY_ID: '${{secrets.AWS_ACCESS_KEY_ID}}'
|
||||||
AWS_SECRET_ACCESS_KEY: ${{secrets.AWS_SECRET_ACCESS_KEY}}
|
AWS_SECRET_ACCESS_KEY: '${{secrets.AWS_SECRET_ACCESS_KEY}}'
|
||||||
AWS_DEFAULT_REGION: ${{secrets.AWS_DEFAULT_REGION}}
|
AWS_DEFAULT_REGION: '${{secrets.AWS_DEFAULT_REGION}}'
|
||||||
|
|||||||
51
.github/workflows/build-docker-pro.yaml
vendored
51
.github/workflows/build-docker-pro.yaml
vendored
@@ -1,35 +1,32 @@
|
|||||||
|
# --------------------------------------------------------------------------------------------
|
||||||
|
# This file is generated. Do not edit manually
|
||||||
|
# --------------------------------------------------------------------------------------------
|
||||||
name: Docker image PREMIUM
|
name: Docker image PREMIUM
|
||||||
|
'on':
|
||||||
on:
|
|
||||||
push:
|
push:
|
||||||
tags:
|
tags:
|
||||||
- 'v[0-9]+.[0-9]+.[0-9]+'
|
- 'v[0-9]+.[0-9]+.[0-9]+'
|
||||||
- 'v[0-9]+.[0-9]+.[0-9]+-premium-beta.[0-9]+'
|
- 'v[0-9]+.[0-9]+.[0-9]+-premium-beta.[0-9]+'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
runs-on: '${{ matrix.os }}'
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-22.04]
|
os:
|
||||||
|
- ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- name: Context
|
- name: Context
|
||||||
env:
|
env:
|
||||||
GITHUB_CONTEXT: ${{ toJson(github) }}
|
GITHUB_CONTEXT: '${{ toJson(github) }}'
|
||||||
run: echo "$GITHUB_CONTEXT"
|
run: echo "$GITHUB_CONTEXT"
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
fetch-depth: 1
|
fetch-depth: 1
|
||||||
|
|
||||||
- name: Docker meta
|
- name: Docker meta
|
||||||
id: meta
|
id: meta
|
||||||
uses: docker/metadata-action@v4
|
uses: docker/metadata-action@v4
|
||||||
with:
|
with:
|
||||||
images: |
|
images: dbgate/dbgate-premium
|
||||||
dbgate/dbgate-premium
|
|
||||||
flavor: |
|
flavor: |
|
||||||
latest=false
|
latest=false
|
||||||
tags: |
|
tags: |
|
||||||
@@ -37,19 +34,16 @@ jobs:
|
|||||||
|
|
||||||
type=match,pattern=\d+.\d+.\d+,enable=${{ !contains(github.ref_name, '-docker.') && !contains(github.ref_name, '-beta.') }}
|
type=match,pattern=\d+.\d+.\d+,enable=${{ !contains(github.ref_name, '-docker.') && !contains(github.ref_name, '-beta.') }}
|
||||||
type=raw,value=latest,enable=${{ !contains(github.ref_name, '-docker.') && !contains(github.ref_name, '-beta.') }}
|
type=raw,value=latest,enable=${{ !contains(github.ref_name, '-docker.') && !contains(github.ref_name, '-beta.') }}
|
||||||
|
|
||||||
- name: Use Node.js 18.x
|
- name: Use Node.js 18.x
|
||||||
uses: actions/setup-node@v1
|
uses: actions/setup-node@v1
|
||||||
with:
|
with:
|
||||||
node-version: 18.x
|
node-version: 18.x
|
||||||
|
|
||||||
- name: Checkout dbgate/dbgate-pro
|
- name: Checkout dbgate/dbgate-pro
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
repository: dbgate/dbgate-pro
|
repository: dbgate/dbgate-pro
|
||||||
token: ${{ secrets.GH_TOKEN }}
|
token: '${{ secrets.GH_TOKEN }}'
|
||||||
path: dbgate-pro
|
path: dbgate-pro
|
||||||
|
|
||||||
- name: Merge dbgate/dbgate-pro
|
- name: Merge dbgate/dbgate-pro
|
||||||
run: |
|
run: |
|
||||||
mkdir ../dbgate-pro
|
mkdir ../dbgate-pro
|
||||||
@@ -61,50 +55,51 @@ jobs:
|
|||||||
yarn
|
yarn
|
||||||
node sync.js --nowatch
|
node sync.js --nowatch
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
- name: adjustPackageJson
|
- name: adjustPackageJson
|
||||||
run: |
|
run: |
|
||||||
cd ..
|
cd ..
|
||||||
cd dbgate-merged
|
cd dbgate-merged
|
||||||
node adjustPackageJson --premium
|
|
||||||
|
|
||||||
|
node adjustPackageJson --premium
|
||||||
- name: yarn install
|
- name: yarn install
|
||||||
run: |
|
run: |
|
||||||
cd ..
|
cd ..
|
||||||
cd dbgate-merged
|
cd dbgate-merged
|
||||||
yarn install
|
|
||||||
|
|
||||||
|
# yarn --version
|
||||||
|
# yarn config set network-timeout 300000
|
||||||
|
yarn install
|
||||||
- name: setCurrentVersion
|
- name: setCurrentVersion
|
||||||
run: |
|
run: |
|
||||||
cd ..
|
cd ..
|
||||||
cd dbgate-merged
|
cd dbgate-merged
|
||||||
yarn setCurrentVersion
|
|
||||||
|
|
||||||
|
yarn setCurrentVersion
|
||||||
- name: printSecrets
|
- name: printSecrets
|
||||||
run: |
|
run: |
|
||||||
cd ..
|
cd ..
|
||||||
cd dbgate-merged
|
cd dbgate-merged
|
||||||
yarn printSecrets
|
|
||||||
|
yarn printSecrets
|
||||||
env:
|
env:
|
||||||
GIST_UPLOAD_SECRET : ${{secrets.GIST_UPLOAD_SECRET}}
|
GIST_UPLOAD_SECRET: '${{secrets.GIST_UPLOAD_SECRET}}'
|
||||||
- name: Prepare docker image
|
- name: Prepare docker image
|
||||||
run: |
|
run: |
|
||||||
cd ..
|
cd ..
|
||||||
cd dbgate-merged
|
cd dbgate-merged
|
||||||
yarn run prepare:docker
|
|
||||||
|
|
||||||
|
yarn run prepare:docker
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v2
|
uses: docker/setup-buildx-action@v2
|
||||||
- name: Login to DockerHub
|
- name: Login to DockerHub
|
||||||
uses: docker/login-action@v2
|
uses: docker/login-action@v2
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKER_USERNAME }}
|
username: '${{ secrets.DOCKER_USERNAME }}'
|
||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
password: '${{ secrets.DOCKER_PASSWORD }}'
|
||||||
|
|
||||||
- name: Build and push
|
- name: Build and push
|
||||||
uses: docker/build-push-action@v3
|
uses: docker/build-push-action@v3
|
||||||
with:
|
with:
|
||||||
push: true
|
push: true
|
||||||
context: ../dbgate-merged/docker
|
context: ../dbgate-merged/docker
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
tags: '${{ steps.meta.outputs.tags }}'
|
||||||
platforms: linux/amd64,linux/arm64
|
platforms: 'linux/amd64,linux/arm64'
|
||||||
|
|||||||
53
.github/workflows/build-docker.yaml
vendored
53
.github/workflows/build-docker.yaml
vendored
@@ -1,35 +1,32 @@
|
|||||||
name: Docker image
|
# --------------------------------------------------------------------------------------------
|
||||||
|
# This file is generated. Do not edit manually
|
||||||
on:
|
# --------------------------------------------------------------------------------------------
|
||||||
|
name: Docker image Community
|
||||||
|
'on':
|
||||||
push:
|
push:
|
||||||
tags:
|
tags:
|
||||||
- 'v[0-9]+.[0-9]+.[0-9]+'
|
- 'v[0-9]+.[0-9]+.[0-9]+'
|
||||||
- 'v[0-9]+.[0-9]+.[0-9]+-beta.[0-9]+'
|
- 'v[0-9]+.[0-9]+.[0-9]+-beta.[0-9]+'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
runs-on: '${{ matrix.os }}'
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-22.04]
|
os:
|
||||||
|
- ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- name: Context
|
- name: Context
|
||||||
env:
|
env:
|
||||||
GITHUB_CONTEXT: ${{ toJson(github) }}
|
GITHUB_CONTEXT: '${{ toJson(github) }}'
|
||||||
run: echo "$GITHUB_CONTEXT"
|
run: echo "$GITHUB_CONTEXT"
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
fetch-depth: 1
|
fetch-depth: 1
|
||||||
|
|
||||||
- name: Docker meta
|
- name: Docker meta
|
||||||
id: meta
|
id: meta
|
||||||
uses: docker/metadata-action@v4
|
uses: docker/metadata-action@v4
|
||||||
with:
|
with:
|
||||||
images: |
|
images: dbgate/dbgate
|
||||||
dbgate/dbgate
|
|
||||||
flavor: |
|
flavor: |
|
||||||
latest=false
|
latest=false
|
||||||
tags: |
|
tags: |
|
||||||
@@ -37,7 +34,6 @@ jobs:
|
|||||||
|
|
||||||
type=match,pattern=\d+.\d+.\d+,enable=${{ !contains(github.ref_name, '-docker.') && !contains(github.ref_name, '-beta.') }}
|
type=match,pattern=\d+.\d+.\d+,enable=${{ !contains(github.ref_name, '-docker.') && !contains(github.ref_name, '-beta.') }}
|
||||||
type=raw,value=latest,enable=${{ !contains(github.ref_name, '-docker.') && !contains(github.ref_name, '-beta.') }}
|
type=raw,value=latest,enable=${{ !contains(github.ref_name, '-docker.') && !contains(github.ref_name, '-beta.') }}
|
||||||
|
|
||||||
- name: Docker alpine meta
|
- name: Docker alpine meta
|
||||||
id: alpmeta
|
id: alpmeta
|
||||||
uses: docker/metadata-action@v4
|
uses: docker/metadata-action@v4
|
||||||
@@ -51,56 +47,53 @@ jobs:
|
|||||||
|
|
||||||
type=match,pattern=\d+.\d+.\d+,suffix=-alpine,enable=${{ !contains(github.ref_name, '-docker.') && !contains(github.ref_name, '-beta.') }}
|
type=match,pattern=\d+.\d+.\d+,suffix=-alpine,enable=${{ !contains(github.ref_name, '-docker.') && !contains(github.ref_name, '-beta.') }}
|
||||||
type=raw,value=alpine,enable=${{ !contains(github.ref_name, '-docker.') && !contains(github.ref_name, '-beta.') }}
|
type=raw,value=alpine,enable=${{ !contains(github.ref_name, '-docker.') && !contains(github.ref_name, '-beta.') }}
|
||||||
|
|
||||||
- name: Use Node.js 18.x
|
- name: Use Node.js 18.x
|
||||||
uses: actions/setup-node@v1
|
uses: actions/setup-node@v1
|
||||||
with:
|
with:
|
||||||
node-version: 18.x
|
node-version: 18.x
|
||||||
|
|
||||||
- name: adjustPackageJson
|
- name: adjustPackageJson
|
||||||
run: |
|
run: |
|
||||||
node adjustPackageJson --community
|
|
||||||
|
|
||||||
|
node adjustPackageJson --community
|
||||||
- name: yarn install
|
- name: yarn install
|
||||||
run: |
|
run: |
|
||||||
|
|
||||||
# yarn --version
|
# yarn --version
|
||||||
# yarn config set network-timeout 300000
|
# yarn config set network-timeout 300000
|
||||||
yarn install
|
yarn install
|
||||||
|
|
||||||
- name: setCurrentVersion
|
- name: setCurrentVersion
|
||||||
run: |
|
run: |
|
||||||
yarn setCurrentVersion
|
|
||||||
|
|
||||||
|
yarn setCurrentVersion
|
||||||
- name: printSecrets
|
- name: printSecrets
|
||||||
run: |
|
run: |
|
||||||
yarn printSecrets
|
|
||||||
|
yarn printSecrets
|
||||||
env:
|
env:
|
||||||
GIST_UPLOAD_SECRET : ${{secrets.GIST_UPLOAD_SECRET}}
|
GIST_UPLOAD_SECRET: '${{secrets.GIST_UPLOAD_SECRET}}'
|
||||||
- name: Prepare docker image
|
- name: Prepare docker image
|
||||||
run: |
|
run: |
|
||||||
yarn run prepare:docker
|
|
||||||
|
|
||||||
|
yarn run prepare:docker
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v2
|
uses: docker/setup-buildx-action@v2
|
||||||
- name: Login to DockerHub
|
- name: Login to DockerHub
|
||||||
uses: docker/login-action@v2
|
uses: docker/login-action@v2
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKER_USERNAME }}
|
username: '${{ secrets.DOCKER_USERNAME }}'
|
||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
password: '${{ secrets.DOCKER_PASSWORD }}'
|
||||||
|
|
||||||
- name: Build and push
|
- name: Build and push
|
||||||
uses: docker/build-push-action@v3
|
uses: docker/build-push-action@v3
|
||||||
with:
|
with:
|
||||||
push: true
|
push: true
|
||||||
context: ./docker
|
context: ./docker
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
tags: '${{ steps.meta.outputs.tags }}'
|
||||||
platforms: linux/amd64,linux/arm64,linux/arm/v7
|
platforms: 'linux/amd64,linux/arm64,linux/arm/v7'
|
||||||
|
|
||||||
- name: Build and push alpine
|
- name: Build and push alpine
|
||||||
uses: docker/build-push-action@v3
|
uses: docker/build-push-action@v3
|
||||||
with:
|
with:
|
||||||
push: true
|
push: true
|
||||||
context: ./docker
|
context: ./docker
|
||||||
file: ./docker/Dockerfile-alpine
|
file: ./docker/Dockerfile-alpine
|
||||||
tags: ${{ steps.alpmeta.outputs.tags }}
|
tags: '${{ steps.alpmeta.outputs.tags }}'
|
||||||
platforms: linux/amd64,linux/arm64,linux/arm/v7
|
platforms: 'linux/amd64,linux/arm64,linux/arm/v7'
|
||||||
|
|||||||
42
.github/workflows/build-npm-pro.yaml
vendored
42
.github/workflows/build-npm-pro.yaml
vendored
@@ -1,31 +1,23 @@
|
|||||||
|
# --------------------------------------------------------------------------------------------
|
||||||
|
# This file is generated. Do not edit manually
|
||||||
|
# --------------------------------------------------------------------------------------------
|
||||||
name: NPM packages PREMIUM
|
name: NPM packages PREMIUM
|
||||||
|
'on':
|
||||||
# on: [push]
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
push:
|
||||||
tags:
|
tags:
|
||||||
- 'v[0-9]+.[0-9]+.[0-9]+'
|
- 'v[0-9]+.[0-9]+.[0-9]+'
|
||||||
- 'v[0-9]+.[0-9]+.[0-9]+-alpha.[0-9]+'
|
- 'v[0-9]+.[0-9]+.[0-9]+-alpha.[0-9]+'
|
||||||
|
|
||||||
# on:
|
|
||||||
# push:
|
|
||||||
# branches:
|
|
||||||
# - production
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
runs-on: '${{ matrix.os }}'
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-22.04]
|
os:
|
||||||
|
- ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- name: Context
|
- name: Context
|
||||||
env:
|
env:
|
||||||
GITHUB_CONTEXT: ${{ toJson(github) }}
|
GITHUB_CONTEXT: '${{ toJson(github) }}'
|
||||||
run: echo "$GITHUB_CONTEXT"
|
run: echo "$GITHUB_CONTEXT"
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
@@ -34,14 +26,12 @@ jobs:
|
|||||||
uses: actions/setup-node@v1
|
uses: actions/setup-node@v1
|
||||||
with:
|
with:
|
||||||
node-version: 18.x
|
node-version: 18.x
|
||||||
|
|
||||||
- name: Checkout dbgate/dbgate-pro
|
- name: Checkout dbgate/dbgate-pro
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
repository: dbgate/dbgate-pro
|
repository: dbgate/dbgate-pro
|
||||||
token: ${{ secrets.GH_TOKEN }}
|
token: '${{ secrets.GH_TOKEN }}'
|
||||||
path: dbgate-pro
|
path: dbgate-pro
|
||||||
|
|
||||||
- name: Merge dbgate/dbgate-pro
|
- name: Merge dbgate/dbgate-pro
|
||||||
run: |
|
run: |
|
||||||
mkdir ../dbgate-pro
|
mkdir ../dbgate-pro
|
||||||
@@ -53,65 +43,55 @@ jobs:
|
|||||||
yarn
|
yarn
|
||||||
node sync.js --nowatch
|
node sync.js --nowatch
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
- name: adjustNpmPackageJsonPremium
|
- name: adjustNpmPackageJsonPremium
|
||||||
run: |
|
run: |
|
||||||
cd ..
|
cd ..
|
||||||
cd dbgate-merged
|
cd dbgate-merged
|
||||||
node adjustNpmPackageJsonPremium
|
node adjustNpmPackageJsonPremium
|
||||||
|
|
||||||
- name: Configure NPM token
|
- name: Configure NPM token
|
||||||
env:
|
env:
|
||||||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
NPM_TOKEN: '${{ secrets.NPM_TOKEN }}'
|
||||||
run: |
|
run: |
|
||||||
cd ..
|
cd ..
|
||||||
cd dbgate-merged
|
cd dbgate-merged
|
||||||
npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
|
npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
|
||||||
|
|
||||||
- name: Remove dbmodel - should be not published
|
- name: Remove dbmodel - should be not published
|
||||||
run: |
|
run: |
|
||||||
cd ..
|
cd ..
|
||||||
cd dbgate-merged
|
cd dbgate-merged
|
||||||
rm -rf packages/dbmodel
|
rm -rf packages/dbmodel
|
||||||
|
|
||||||
- name: yarn install
|
- name: yarn install
|
||||||
run: |
|
run: |
|
||||||
cd ..
|
cd ..
|
||||||
cd dbgate-merged
|
cd dbgate-merged
|
||||||
yarn install
|
yarn install
|
||||||
|
|
||||||
- name: setCurrentVersion
|
- name: setCurrentVersion
|
||||||
run: |
|
run: |
|
||||||
cd ..
|
cd ..
|
||||||
cd dbgate-merged
|
cd dbgate-merged
|
||||||
yarn setCurrentVersion
|
yarn setCurrentVersion
|
||||||
|
|
||||||
- name: printSecrets
|
- name: printSecrets
|
||||||
run: |
|
run: |
|
||||||
cd ..
|
cd ..
|
||||||
cd dbgate-merged
|
cd dbgate-merged
|
||||||
yarn printSecrets
|
yarn printSecrets
|
||||||
env:
|
env:
|
||||||
GIST_UPLOAD_SECRET : ${{secrets.GIST_UPLOAD_SECRET}}
|
GIST_UPLOAD_SECRET: '${{secrets.GIST_UPLOAD_SECRET}}'
|
||||||
|
|
||||||
- name: Publish dbgate-api-premium
|
- name: Publish dbgate-api-premium
|
||||||
run: |
|
run: |
|
||||||
cd ..
|
cd ..
|
||||||
cd dbgate-merged/packages/api
|
cd dbgate-merged/packages/api
|
||||||
npm publish
|
npm publish
|
||||||
|
|
||||||
- name: Publish dbgate-web-premium
|
- name: Publish dbgate-web-premium
|
||||||
run: |
|
run: |
|
||||||
cd ..
|
cd ..
|
||||||
cd dbgate-merged/packages/web
|
cd dbgate-merged/packages/web
|
||||||
npm publish
|
npm publish
|
||||||
|
|
||||||
- name: Publish dbgate-serve-premium
|
- name: Publish dbgate-serve-premium
|
||||||
run: |
|
run: |
|
||||||
cd ..
|
cd ..
|
||||||
cd dbgate-merged/packages/serve
|
cd dbgate-merged/packages/serve
|
||||||
npm publish
|
npm publish
|
||||||
|
|
||||||
- name: Publish dbgate-plugin-cosmosdb
|
- name: Publish dbgate-plugin-cosmosdb
|
||||||
run: |
|
run: |
|
||||||
cd ..
|
cd ..
|
||||||
|
|||||||
53
.github/workflows/build-npm.yaml
vendored
53
.github/workflows/build-npm.yaml
vendored
@@ -1,31 +1,23 @@
|
|||||||
|
# --------------------------------------------------------------------------------------------
|
||||||
|
# This file is generated. Do not edit manually
|
||||||
|
# --------------------------------------------------------------------------------------------
|
||||||
name: NPM packages
|
name: NPM packages
|
||||||
|
'on':
|
||||||
# on: [push]
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
push:
|
||||||
tags:
|
tags:
|
||||||
- 'v[0-9]+.[0-9]+.[0-9]+'
|
- 'v[0-9]+.[0-9]+.[0-9]+'
|
||||||
- 'v[0-9]+.[0-9]+.[0-9]+-alpha.[0-9]+'
|
- 'v[0-9]+.[0-9]+.[0-9]+-alpha.[0-9]+'
|
||||||
|
|
||||||
# on:
|
|
||||||
# push:
|
|
||||||
# branches:
|
|
||||||
# - production
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
runs-on: '${{ matrix.os }}'
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-22.04]
|
os:
|
||||||
|
- ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- name: Context
|
- name: Context
|
||||||
env:
|
env:
|
||||||
GITHUB_CONTEXT: ${{ toJson(github) }}
|
GITHUB_CONTEXT: '${{ toJson(github) }}'
|
||||||
run: echo "$GITHUB_CONTEXT"
|
run: echo "$GITHUB_CONTEXT"
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
@@ -34,37 +26,30 @@ jobs:
|
|||||||
uses: actions/setup-node@v1
|
uses: actions/setup-node@v1
|
||||||
with:
|
with:
|
||||||
node-version: 18.x
|
node-version: 18.x
|
||||||
|
|
||||||
- name: Configure NPM token
|
- name: Configure NPM token
|
||||||
env:
|
env:
|
||||||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
NPM_TOKEN: '${{ secrets.NPM_TOKEN }}'
|
||||||
run: |
|
run: |
|
||||||
npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
|
npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
|
||||||
|
|
||||||
- name: yarn install
|
- name: yarn install
|
||||||
run: |
|
run: |
|
||||||
yarn install
|
yarn install
|
||||||
|
|
||||||
- name: setCurrentVersion
|
- name: setCurrentVersion
|
||||||
run: |
|
run: |
|
||||||
yarn setCurrentVersion
|
yarn setCurrentVersion
|
||||||
|
|
||||||
- name: printSecrets
|
- name: printSecrets
|
||||||
run: |
|
run: |
|
||||||
yarn printSecrets
|
yarn printSecrets
|
||||||
env:
|
env:
|
||||||
GIST_UPLOAD_SECRET : ${{secrets.GIST_UPLOAD_SECRET}}
|
GIST_UPLOAD_SECRET: '${{secrets.GIST_UPLOAD_SECRET}}'
|
||||||
|
|
||||||
- name: Publish types
|
- name: Publish types
|
||||||
working-directory: packages/types
|
working-directory: packages/types
|
||||||
run: |
|
run: |
|
||||||
npm publish
|
npm publish
|
||||||
|
|
||||||
- name: Publish tools
|
- name: Publish tools
|
||||||
working-directory: packages/tools
|
working-directory: packages/tools
|
||||||
run: |
|
run: |
|
||||||
npm publish
|
npm publish
|
||||||
|
|
||||||
- name: Publish sqltree
|
- name: Publish sqltree
|
||||||
working-directory: packages/sqltree
|
working-directory: packages/sqltree
|
||||||
run: |
|
run: |
|
||||||
@@ -74,82 +59,66 @@ jobs:
|
|||||||
working-directory: packages/api
|
working-directory: packages/api
|
||||||
run: |
|
run: |
|
||||||
npm publish
|
npm publish
|
||||||
|
|
||||||
- name: Publish datalib
|
- name: Publish datalib
|
||||||
working-directory: packages/datalib
|
working-directory: packages/datalib
|
||||||
run: |
|
run: |
|
||||||
npm publish
|
npm publish
|
||||||
|
|
||||||
- name: Publish filterparser
|
- name: Publish filterparser
|
||||||
working-directory: packages/filterparser
|
working-directory: packages/filterparser
|
||||||
run: |
|
run: |
|
||||||
npm publish
|
npm publish
|
||||||
|
|
||||||
- name: Publish web
|
- name: Publish web
|
||||||
working-directory: packages/web
|
working-directory: packages/web
|
||||||
run: |
|
run: |
|
||||||
npm publish
|
npm publish
|
||||||
|
|
||||||
- name: Publish dbgate-serve
|
- name: Publish dbgate-serve
|
||||||
working-directory: packages/serve
|
working-directory: packages/serve
|
||||||
run: |
|
run: |
|
||||||
npm publish
|
npm publish
|
||||||
|
|
||||||
- name: Publish dbmodel
|
- name: Publish dbmodel
|
||||||
working-directory: packages/dbmodel
|
working-directory: packages/dbmodel
|
||||||
run: |
|
run: |
|
||||||
npm publish
|
npm publish
|
||||||
|
|
||||||
- name: Publish dbgate-plugin-csv
|
- name: Publish dbgate-plugin-csv
|
||||||
working-directory: plugins/dbgate-plugin-csv
|
working-directory: plugins/dbgate-plugin-csv
|
||||||
run: |
|
run: |
|
||||||
npm publish
|
npm publish
|
||||||
|
|
||||||
- name: Publish dbgate-plugin-xml
|
- name: Publish dbgate-plugin-xml
|
||||||
working-directory: plugins/dbgate-plugin-xml
|
working-directory: plugins/dbgate-plugin-xml
|
||||||
run: |
|
run: |
|
||||||
npm publish
|
npm publish
|
||||||
|
|
||||||
- name: Publish dbgate-plugin-excel
|
- name: Publish dbgate-plugin-excel
|
||||||
working-directory: plugins/dbgate-plugin-excel
|
working-directory: plugins/dbgate-plugin-excel
|
||||||
run: |
|
run: |
|
||||||
npm publish
|
npm publish
|
||||||
|
|
||||||
- name: Publish dbgate-plugin-mssql
|
- name: Publish dbgate-plugin-mssql
|
||||||
working-directory: plugins/dbgate-plugin-mssql
|
working-directory: plugins/dbgate-plugin-mssql
|
||||||
run: |
|
run: |
|
||||||
npm publish
|
npm publish
|
||||||
|
|
||||||
- name: Publish dbgate-plugin-mysql
|
- name: Publish dbgate-plugin-mysql
|
||||||
working-directory: plugins/dbgate-plugin-mysql
|
working-directory: plugins/dbgate-plugin-mysql
|
||||||
run: |
|
run: |
|
||||||
npm publish
|
npm publish
|
||||||
|
|
||||||
- name: Publish dbgate-plugin-mongo
|
- name: Publish dbgate-plugin-mongo
|
||||||
working-directory: plugins/dbgate-plugin-mongo
|
working-directory: plugins/dbgate-plugin-mongo
|
||||||
run: |
|
run: |
|
||||||
npm publish
|
npm publish
|
||||||
|
|
||||||
- name: Publish dbgate-plugin-postgres
|
- name: Publish dbgate-plugin-postgres
|
||||||
working-directory: plugins/dbgate-plugin-postgres
|
working-directory: plugins/dbgate-plugin-postgres
|
||||||
run: |
|
run: |
|
||||||
npm publish
|
npm publish
|
||||||
|
|
||||||
- name: Publish dbgate-plugin-sqlite
|
- name: Publish dbgate-plugin-sqlite
|
||||||
working-directory: plugins/dbgate-plugin-sqlite
|
working-directory: plugins/dbgate-plugin-sqlite
|
||||||
run: |
|
run: |
|
||||||
npm publish
|
npm publish
|
||||||
|
|
||||||
- name: Publish dbgate-plugin-redis
|
- name: Publish dbgate-plugin-redis
|
||||||
working-directory: plugins/dbgate-plugin-redis
|
working-directory: plugins/dbgate-plugin-redis
|
||||||
run: |
|
run: |
|
||||||
npm publish
|
npm publish
|
||||||
|
|
||||||
- name: Publish dbgate-plugin-oracle
|
- name: Publish dbgate-plugin-oracle
|
||||||
working-directory: plugins/dbgate-plugin-oracle
|
working-directory: plugins/dbgate-plugin-oracle
|
||||||
run: |
|
run: |
|
||||||
npm publish
|
npm publish
|
||||||
|
|
||||||
- name: Publish dbgate-plugin-clickhouse
|
- name: Publish dbgate-plugin-clickhouse
|
||||||
working-directory: plugins/dbgate-plugin-clickhouse
|
working-directory: plugins/dbgate-plugin-clickhouse
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
40
.github/workflows/run-tests.yaml
vendored
40
.github/workflows/run-tests.yaml
vendored
@@ -1,16 +1,17 @@
|
|||||||
|
# --------------------------------------------------------------------------------------------
|
||||||
|
# This file is generated. Do not edit manually
|
||||||
|
# --------------------------------------------------------------------------------------------
|
||||||
name: Run tests
|
name: Run tests
|
||||||
on:
|
'on':
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
- develop
|
- develop
|
||||||
- 'feature/**'
|
- feature/**
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test-runner:
|
test-runner:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: node:18
|
container: 'node:18'
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Install dependencies for cypress
|
- name: Install dependencies for cypress
|
||||||
run: |
|
run: |
|
||||||
@@ -37,7 +38,6 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
cd integration-tests
|
cd integration-tests
|
||||||
yarn test:ci
|
yarn test:ci
|
||||||
# yarn wait:ci
|
|
||||||
- name: Filter parser tests
|
- name: Filter parser tests
|
||||||
if: always()
|
if: always()
|
||||||
run: |
|
run: |
|
||||||
@@ -51,54 +51,42 @@ jobs:
|
|||||||
- uses: tanmen/jest-reporter@v1
|
- uses: tanmen/jest-reporter@v1
|
||||||
if: always()
|
if: always()
|
||||||
with:
|
with:
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
github-token: '${{ secrets.GITHUB_TOKEN }}'
|
||||||
result-file: integration-tests/result.json
|
result-file: integration-tests/result.json
|
||||||
action-name: Integration tests
|
action-name: Integration tests
|
||||||
- uses: tanmen/jest-reporter@v1
|
- uses: tanmen/jest-reporter@v1
|
||||||
if: always()
|
if: always()
|
||||||
with:
|
with:
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
github-token: '${{ secrets.GITHUB_TOKEN }}'
|
||||||
result-file: packages/filterparser/result.json
|
result-file: packages/filterparser/result.json
|
||||||
action-name: Filter parser test results
|
action-name: Filter parser test results
|
||||||
- uses: tanmen/jest-reporter@v1
|
- uses: tanmen/jest-reporter@v1
|
||||||
if: always()
|
if: always()
|
||||||
with:
|
with:
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
github-token: '${{ secrets.GITHUB_TOKEN }}'
|
||||||
result-file: packages/datalib/result.json
|
result-file: packages/datalib/result.json
|
||||||
action-name: Datalib (perspectives) test results
|
action-name: Datalib (perspectives) test results
|
||||||
|
|
||||||
services:
|
services:
|
||||||
postgres:
|
postgres:
|
||||||
image: postgres
|
image: postgres
|
||||||
env:
|
env:
|
||||||
POSTGRES_PASSWORD: Pwd2020Db
|
POSTGRES_PASSWORD: Pwd2020Db
|
||||||
options: >-
|
options: '--health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5'
|
||||||
--health-cmd pg_isready
|
|
||||||
--health-interval 10s
|
|
||||||
--health-timeout 5s
|
|
||||||
--health-retries 5
|
|
||||||
|
|
||||||
mysql:
|
mysql:
|
||||||
image: mysql:8.0.18
|
image: 'mysql:8.0.18'
|
||||||
env:
|
env:
|
||||||
MYSQL_ROOT_PASSWORD: Pwd2020Db
|
MYSQL_ROOT_PASSWORD: Pwd2020Db
|
||||||
|
|
||||||
mssql:
|
mssql:
|
||||||
image: mcr.microsoft.com/mssql/server
|
image: mcr.microsoft.com/mssql/server
|
||||||
env:
|
env:
|
||||||
ACCEPT_EULA: Y
|
ACCEPT_EULA: 'Y'
|
||||||
SA_PASSWORD: Pwd2020Db
|
SA_PASSWORD: Pwd2020Db
|
||||||
MSSQL_PID: Express
|
MSSQL_PID: Express
|
||||||
|
|
||||||
clickhouse:
|
clickhouse:
|
||||||
image: bitnami/clickhouse:24.8.4
|
image: 'bitnami/clickhouse:24.8.4'
|
||||||
env:
|
env:
|
||||||
CLICKHOUSE_ADMIN_PASSWORD: Pwd2020Db
|
CLICKHOUSE_ADMIN_PASSWORD: Pwd2020Db
|
||||||
|
|
||||||
oracle:
|
oracle:
|
||||||
image: gvenzl/oracle-xe:21-slim
|
image: 'gvenzl/oracle-xe:21-slim'
|
||||||
env:
|
env:
|
||||||
ORACLE_PASSWORD: Pwd2020Db
|
ORACLE_PASSWORD: Pwd2020Db
|
||||||
|
|
||||||
# cockroachdb:
|
|
||||||
# image: cockroachdb/cockroach
|
|
||||||
|
|||||||
174
common/processWorkflows.js
Normal file
174
common/processWorkflows.js
Normal file
@@ -0,0 +1,174 @@
|
|||||||
|
const fs = require('fs');
|
||||||
|
const path = require('path');
|
||||||
|
const yaml = require('js-yaml');
|
||||||
|
const _ = require('lodash');
|
||||||
|
|
||||||
|
const indir = path.resolve(path.join(__dirname, '..', 'workflow-templates'));
|
||||||
|
const outdir = path.resolve(path.join(__dirname, '..', '.github', 'workflows'));
|
||||||
|
|
||||||
|
const includes = {};
|
||||||
|
|
||||||
|
const HEADER = `# --------------------------------------------------------------------------------------------
|
||||||
|
# This file is generated. Do not edit manually
|
||||||
|
# --------------------------------------------------------------------------------------------
|
||||||
|
`;
|
||||||
|
|
||||||
|
function readIncludes() {
|
||||||
|
for (const file of fs.readdirSync(indir)) {
|
||||||
|
const text = fs.readFileSync(path.join(indir, file), { encoding: 'utf-8' });
|
||||||
|
const json = yaml.load(text);
|
||||||
|
if (json._module) {
|
||||||
|
for (const key in json) {
|
||||||
|
if (key === '_module') {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
includes[key] = json[key];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
let modified = false;
|
||||||
|
|
||||||
|
function conditionMatch(condition, args) {
|
||||||
|
if (_.isString(condition)) {
|
||||||
|
return args.defs.includes(condition);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
function processJsonStep(json, args) {
|
||||||
|
return _.cloneDeepWith(json, value => {
|
||||||
|
if (_.isArray(value)) {
|
||||||
|
const res = [];
|
||||||
|
let arrayModified = false;
|
||||||
|
for (const item of value) {
|
||||||
|
if (item._if) {
|
||||||
|
modified = true;
|
||||||
|
arrayModified = true;
|
||||||
|
if (conditionMatch(item._if, args)) {
|
||||||
|
res.push(_.omit(item, ['_if']));
|
||||||
|
}
|
||||||
|
} else if (item._replace || item._include) {
|
||||||
|
const replaceWith = item._replace ? args.replace?.[item._replace] : includes[item._include];
|
||||||
|
if (replaceWith) {
|
||||||
|
modified = true;
|
||||||
|
arrayModified = true;
|
||||||
|
if (_.isArray(replaceWith)) {
|
||||||
|
res.push(...replaceWith);
|
||||||
|
} else {
|
||||||
|
res.push(replaceWith);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
res.push(item);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
res.push(item);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (arrayModified) {
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (_.isPlainObject(value)) {
|
||||||
|
if (_.intersection(args.allDefs ?? [], Object.keys(value))?.length > 0) {
|
||||||
|
modified = true;
|
||||||
|
for (const key in value) {
|
||||||
|
if (args.defs.includes(key)) {
|
||||||
|
return value[key];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (_.isString(value)) {
|
||||||
|
let stringModified = false;
|
||||||
|
for (const key of Object.keys(args.stringReplace ?? {})) {
|
||||||
|
if (value.includes(key)) {
|
||||||
|
modified = true;
|
||||||
|
stringModified = true;
|
||||||
|
value = value.replaceAll(key, args.stringReplace[key]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (stringModified) {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (value?._include) {
|
||||||
|
modified = true;
|
||||||
|
return includes[value?._include];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (value?._replace) {
|
||||||
|
modified = true;
|
||||||
|
return args?.replace[value?._replace];
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function processJson(json, args = {}) {
|
||||||
|
const MAX_STEPS = 64;
|
||||||
|
for (let i = 0; i < MAX_STEPS; i++) {
|
||||||
|
modified = false;
|
||||||
|
json = processJsonStep(json, args);
|
||||||
|
if (!modified) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return json;
|
||||||
|
}
|
||||||
|
|
||||||
|
function processFiles() {
|
||||||
|
const dumpOptions = {
|
||||||
|
lineWidth: -1,
|
||||||
|
};
|
||||||
|
for (const file of fs.readdirSync(indir)) {
|
||||||
|
const text = fs.readFileSync(path.join(indir, file), { encoding: 'utf-8' });
|
||||||
|
const json = yaml.load(text);
|
||||||
|
|
||||||
|
if (json._module) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (json._templates) {
|
||||||
|
const allDefs = Object.keys(json._templates);
|
||||||
|
for (const key in json._templates) {
|
||||||
|
allDefs.push(...(json._templates[key].defs ?? []));
|
||||||
|
}
|
||||||
|
|
||||||
|
for (const key in json._templates) {
|
||||||
|
const args = {
|
||||||
|
defs: [key, ...(json._templates[key]?.defs ?? [])],
|
||||||
|
replace: json._templates[key]?.replace,
|
||||||
|
stringReplace: json._templates[key]?.['string-replace'],
|
||||||
|
allDefs,
|
||||||
|
};
|
||||||
|
const converted = processJson(_.omit(json, ['_templates']), args);
|
||||||
|
const out = path.join(outdir, json._templates[key].file);
|
||||||
|
fs.writeFileSync(out, HEADER + yaml.dump(converted, dumpOptions));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
fs.writeFileSync(path.join(outdir, file), HEADER + yaml.dump(processJson(json), dumpOptions));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function deleteOldFiles() {
|
||||||
|
const files = fs.readdirSync(outdir);
|
||||||
|
for (const file of files) {
|
||||||
|
fs.unlinkSync(path.join(outdir, file));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function run() {
|
||||||
|
deleteOldFiles();
|
||||||
|
readIncludes();
|
||||||
|
processFiles();
|
||||||
|
}
|
||||||
|
|
||||||
|
run();
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "6.1.2",
|
"version": "6.1.3-beta.1",
|
||||||
"name": "dbgate-all",
|
"name": "dbgate-all",
|
||||||
"workspaces": [
|
"workspaces": [
|
||||||
"packages/*",
|
"packages/*",
|
||||||
@@ -62,7 +62,8 @@
|
|||||||
"ts:web": "yarn workspace dbgate-web ts",
|
"ts:web": "yarn workspace dbgate-web ts",
|
||||||
"ts": "yarn ts:api && yarn ts:web",
|
"ts": "yarn ts:api && yarn ts:web",
|
||||||
"postinstall": "yarn resetPackagedPlugins && yarn build:lib && patch-package && yarn build:plugins:frontend",
|
"postinstall": "yarn resetPackagedPlugins && yarn build:lib && patch-package && yarn build:plugins:frontend",
|
||||||
"dbgate-serve": "node packages/dbgate/bin/dbgate-serve.js"
|
"dbgate-serve": "node packages/dbgate/bin/dbgate-serve.js",
|
||||||
|
"workflows": "node common/processWorkflows.js"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"concurrently": "^5.1.0",
|
"concurrently": "^5.1.0",
|
||||||
|
|||||||
220
workflow-templates/build-app.tpl.yaml
Normal file
220
workflow-templates/build-app.tpl.yaml
Normal file
@@ -0,0 +1,220 @@
|
|||||||
|
_templates:
|
||||||
|
_community_beta:
|
||||||
|
file: build-app-beta.yaml
|
||||||
|
defs:
|
||||||
|
- _community
|
||||||
|
- _beta
|
||||||
|
- _channel
|
||||||
|
string-replace:
|
||||||
|
"<<cd_merged>>": ''
|
||||||
|
"<<adjust>>": '--community'
|
||||||
|
"<<artifact-root>>": 'app/dist'
|
||||||
|
"<<channel>>": beta
|
||||||
|
"<<suffix>>": 'beta'
|
||||||
|
_community_stable:
|
||||||
|
file: build-app.yaml
|
||||||
|
defs:
|
||||||
|
- _community
|
||||||
|
- _stable
|
||||||
|
string-replace:
|
||||||
|
"<<cd_merged>>": ''
|
||||||
|
"<<adjust>>": '--community'
|
||||||
|
"<<artifact-root>>": 'app/dist'
|
||||||
|
"<<suffix>>": 'latest'
|
||||||
|
|
||||||
|
|
||||||
|
_premium_beta:
|
||||||
|
file: build-app-pro-beta.yaml
|
||||||
|
defs:
|
||||||
|
- _premium
|
||||||
|
- _beta
|
||||||
|
- _channel
|
||||||
|
string-replace:
|
||||||
|
"<<cd_merged>>": |
|
||||||
|
cd ..
|
||||||
|
cd dbgate-merged
|
||||||
|
"<<adjust>>": '--premium'
|
||||||
|
"<<artifact-root>>": '../dbgate-merged/app/dist'
|
||||||
|
"<<channel>>": 'premium-beta'
|
||||||
|
"<<suffix>>": 'premium-beta'
|
||||||
|
_premium_stable:
|
||||||
|
file: build-app-pro.yaml
|
||||||
|
defs:
|
||||||
|
- _premium
|
||||||
|
- _stable
|
||||||
|
- _channel
|
||||||
|
string-replace:
|
||||||
|
"<<cd_merged>>": |
|
||||||
|
cd ..
|
||||||
|
cd dbgate-merged
|
||||||
|
"<<adjust>>": '--premium'
|
||||||
|
"<<artifact-root>>": '../dbgate-merged/app/dist'
|
||||||
|
"<<channel>>": 'premium'
|
||||||
|
"<<suffix>>": 'premium-latest'
|
||||||
|
|
||||||
|
name:
|
||||||
|
_community_beta: Electron app BETA
|
||||||
|
_community_stable: Electron app
|
||||||
|
_premium_beta: Electron app PREMIUM BETA
|
||||||
|
_premium_stable: Electron app PREMIUM
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- _community_beta: 'v[0-9]+.[0-9]+.[0-9]+-beta.[0-9]+'
|
||||||
|
_premium_beta: 'v[0-9]+.[0-9]+.[0-9]+-premium-beta.[0-9]+'
|
||||||
|
_stable: 'v[0-9]+.[0-9]+.[0-9]+'
|
||||||
|
# - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
|
||||||
|
|
||||||
|
# branches:
|
||||||
|
# - production
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
# os: [ubuntu-22.04, windows-2016]
|
||||||
|
os: [macos-14, windows-2022, ubuntu-22.04]
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Install python 3.11 (MacOS)
|
||||||
|
if: matrix.os == 'macos-14'
|
||||||
|
run: |
|
||||||
|
brew install python@3.11
|
||||||
|
echo "PYTHON=/opt/homebrew/bin/python3.11" >> $GITHUB_ENV
|
||||||
|
- name: Context
|
||||||
|
env:
|
||||||
|
GITHUB_CONTEXT: ${{ toJson(github) }}
|
||||||
|
run: echo "$GITHUB_CONTEXT"
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
fetch-depth: 1
|
||||||
|
- name: Use Node.js 22.x
|
||||||
|
uses: actions/setup-node@v1
|
||||||
|
with:
|
||||||
|
node-version: 22.x
|
||||||
|
|
||||||
|
- _include: checkout-and-merge-pro
|
||||||
|
_if: _premium
|
||||||
|
|
||||||
|
- name: adjustPackageJson
|
||||||
|
run: |
|
||||||
|
<<cd_merged>>
|
||||||
|
node adjustPackageJson <<adjust>>
|
||||||
|
- name: setUpdaterChannel <<channel>>
|
||||||
|
_if: _channel
|
||||||
|
run: |
|
||||||
|
<<cd_merged>>
|
||||||
|
node setUpdaterChannel <<channel>>
|
||||||
|
- name: yarn set timeout
|
||||||
|
run: |
|
||||||
|
<<cd_merged>>
|
||||||
|
yarn config set network-timeout 100000
|
||||||
|
- name: yarn install
|
||||||
|
run: |
|
||||||
|
<<cd_merged>>
|
||||||
|
yarn install
|
||||||
|
- name: setCurrentVersion
|
||||||
|
run: |
|
||||||
|
<<cd_merged>>
|
||||||
|
yarn setCurrentVersion
|
||||||
|
- name: printSecrets
|
||||||
|
run: |
|
||||||
|
<<cd_merged>>
|
||||||
|
yarn printSecrets
|
||||||
|
env:
|
||||||
|
GIST_UPLOAD_SECRET : ${{secrets.GIST_UPLOAD_SECRET}}
|
||||||
|
- name: fillPackagedPlugins
|
||||||
|
run: |
|
||||||
|
<<cd_merged>>
|
||||||
|
yarn fillPackagedPlugins
|
||||||
|
- name: Install Snapcraft
|
||||||
|
_if: _community
|
||||||
|
if: matrix.os == 'ubuntu-22.04'
|
||||||
|
uses: samuelmeuli/action-snapcraft@v1
|
||||||
|
- name: Publish
|
||||||
|
run: |
|
||||||
|
<<cd_merged>>
|
||||||
|
yarn run build:app
|
||||||
|
env:
|
||||||
|
GH_TOKEN: ${{ secrets.GH_TOKEN }} # token for electron publish
|
||||||
|
|
||||||
|
WIN_CSC_LINK: ${{ secrets.WINCERT_2025 }}
|
||||||
|
WIN_CSC_KEY_PASSWORD: ${{ secrets.WINCERT_2025_PASSWORD }}
|
||||||
|
# WIN_CSC_LINK: ${{ secrets.WINCERT_CERTIFICATE }}
|
||||||
|
# WIN_CSC_KEY_PASSWORD: ${{ secrets.WINCERT_PASSWORD }}
|
||||||
|
|
||||||
|
CSC_LINK: ${{ secrets.APPLECERT_CERTIFICATE }}
|
||||||
|
CSC_KEY_PASSWORD: ${{ secrets.APPLECERT_PASSWORD }}
|
||||||
|
|
||||||
|
APPLE_ID: ${{ secrets.APPLE_ID }}
|
||||||
|
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
|
||||||
|
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
|
||||||
|
|
||||||
|
SNAPCRAFT_STORE_CREDENTIALS: ${{secrets.SNAPCRAFT_LOGIN}}
|
||||||
|
APPLE_APP_SPECIFIC_PASSWORD: ${{secrets.APPLE_APP_SPECIFIC_PASSWORD}}
|
||||||
|
|
||||||
|
- name: generatePadFile
|
||||||
|
_if: _community_stable
|
||||||
|
run: |
|
||||||
|
yarn generatePadFile
|
||||||
|
|
||||||
|
- name: Copy artifacts
|
||||||
|
run: |
|
||||||
|
mkdir artifacts
|
||||||
|
|
||||||
|
cp <<artifact-root>>/*.deb artifacts/dbgate-<<suffix>>.deb || true
|
||||||
|
cp <<artifact-root>>/*x86*.AppImage artifacts/dbgate-<<suffix>>.AppImage || true
|
||||||
|
cp <<artifact-root>>/*arm64*.AppImage artifacts/dbgate-<<suffix>>-arm64.AppImage || true
|
||||||
|
cp <<artifact-root>>/*armv7l*.AppImage artifacts/dbgate-<<suffix>>-armv7l.AppImage || true
|
||||||
|
cp <<artifact-root>>/*win*.exe artifacts/dbgate-<<suffix>>.exe || true
|
||||||
|
cp <<artifact-root>>/*win_x64.zip artifacts/dbgate-windows-<<suffix>>.zip || true
|
||||||
|
cp <<artifact-root>>/*win_arm64.zip artifacts/dbgate-windows-<<suffix>>-arm64.zip || true
|
||||||
|
cp <<artifact-root>>/*-mac_universal.dmg artifacts/dbgate-<<suffix>>.dmg || true
|
||||||
|
cp <<artifact-root>>/*-mac_x64.dmg artifacts/dbgate-<<suffix>>-x64.dmg || true
|
||||||
|
cp <<artifact-root>>/*-mac_arm64.dmg artifacts/dbgate-<<suffix>>-arm64.dmg || true
|
||||||
|
mv <<artifact-root>>/*.snap artifacts/dbgate-<<suffix>>.snap || true
|
||||||
|
|
||||||
|
mv <<artifact-root>>/*.exe artifacts/ || true
|
||||||
|
mv <<artifact-root>>/*.zip artifacts/ || true
|
||||||
|
mv <<artifact-root>>/*.tar.gz artifacts/ || true
|
||||||
|
mv <<artifact-root>>/*.AppImage artifacts/ || true
|
||||||
|
mv <<artifact-root>>/*.deb artifacts/ || true
|
||||||
|
mv <<artifact-root>>/*.snap artifacts/ || true
|
||||||
|
mv <<artifact-root>>/*.dmg artifacts/ || true
|
||||||
|
mv <<artifact-root>>/*.blockmap artifacts/ || true
|
||||||
|
|
||||||
|
mv <<artifact-root>>/*.yml artifacts/ || true
|
||||||
|
rm artifacts/builder-debug.yml
|
||||||
|
|
||||||
|
- name: Copy PAD file
|
||||||
|
_if: _community_stable
|
||||||
|
if: matrix.os == 'windows-2022'
|
||||||
|
run: |
|
||||||
|
mv app/dist/dbgate-pad.xml artifacts/ || true
|
||||||
|
|
||||||
|
- name: Upload artifacts
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: ${{ matrix.os }}
|
||||||
|
path: artifacts
|
||||||
|
|
||||||
|
- name: Release
|
||||||
|
uses: softprops/action-gh-release@v1
|
||||||
|
if: startsWith(github.ref, 'refs/tags/')
|
||||||
|
with:
|
||||||
|
files: 'artifacts/**'
|
||||||
|
prerelease:
|
||||||
|
_beta: true
|
||||||
|
_stable: false
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Print content of notarization-error.log
|
||||||
|
if: failure() && matrix.os == 'macos-14'
|
||||||
|
run: |
|
||||||
|
<<cd_merged>>
|
||||||
|
find . -type f -name "notarization-error.log" -exec echo "=== Start of {} ===" \; -exec cat {} \; -exec echo "=== End of {} ===" \;
|
||||||
148
workflow-templates/build-aws-pro-beta.yaml
Normal file
148
workflow-templates/build-aws-pro-beta.yaml
Normal file
@@ -0,0 +1,148 @@
|
|||||||
|
name: AWS image PREMIUM
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- 'v[0-9]+.[0-9]+.[0-9]+'
|
||||||
|
# - 'v[0-9]+.[0-9]+.[0-9]+-premium-beta.[0-9]+'
|
||||||
|
- 'v[0-9]+.[0-9]+.[0-9]+-packer-beta.[0-9]+'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
os: [ubuntu-22.04]
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Context
|
||||||
|
env:
|
||||||
|
GITHUB_CONTEXT: ${{ toJson(github) }}
|
||||||
|
run: echo "$GITHUB_CONTEXT"
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
fetch-depth: 1
|
||||||
|
|
||||||
|
- name: Use Node.js 18.x
|
||||||
|
uses: actions/setup-node@v1
|
||||||
|
with:
|
||||||
|
node-version: 18.x
|
||||||
|
|
||||||
|
- name: Setup `packer`
|
||||||
|
uses: hashicorp/setup-packer@main
|
||||||
|
with:
|
||||||
|
version: latest
|
||||||
|
|
||||||
|
- name: Checkout dbgate/dbgate-pro
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
repository: dbgate/dbgate-pro
|
||||||
|
token: ${{ secrets.GH_TOKEN }}
|
||||||
|
path: dbgate-pro
|
||||||
|
|
||||||
|
- name: Merge dbgate/dbgate-pro
|
||||||
|
run: |
|
||||||
|
mkdir ../dbgate-pro
|
||||||
|
mv dbgate-pro/* ../dbgate-pro/
|
||||||
|
cd ..
|
||||||
|
mkdir dbgate-merged
|
||||||
|
cd dbgate-pro
|
||||||
|
cd sync
|
||||||
|
yarn
|
||||||
|
node sync.js --nowatch
|
||||||
|
cd ..
|
||||||
|
|
||||||
|
- name: adjustPackageJson
|
||||||
|
run: |
|
||||||
|
cd ..
|
||||||
|
cd dbgate-merged
|
||||||
|
node adjustPackageJson --premium
|
||||||
|
|
||||||
|
- name: yarn install
|
||||||
|
run: |
|
||||||
|
cd ..
|
||||||
|
cd dbgate-merged
|
||||||
|
yarn install
|
||||||
|
|
||||||
|
- name: setCurrentVersion
|
||||||
|
run: |
|
||||||
|
cd ..
|
||||||
|
cd dbgate-merged
|
||||||
|
yarn setCurrentVersion
|
||||||
|
|
||||||
|
- name: printSecrets
|
||||||
|
run: |
|
||||||
|
cd ..
|
||||||
|
cd dbgate-merged
|
||||||
|
yarn printSecrets
|
||||||
|
env:
|
||||||
|
GIST_UPLOAD_SECRET : ${{secrets.GIST_UPLOAD_SECRET}}
|
||||||
|
|
||||||
|
- name: Prepare packer build
|
||||||
|
run: |
|
||||||
|
cd ..
|
||||||
|
cd dbgate-merged
|
||||||
|
yarn run prepare:packer
|
||||||
|
cd packer
|
||||||
|
zip -r cloud-build.zip build
|
||||||
|
|
||||||
|
- name: Copy artifacts
|
||||||
|
run: |
|
||||||
|
mkdir artifacts
|
||||||
|
cp ../dbgate-merged/packer/cloud-build.zip artifacts/cloud-build.zip || true
|
||||||
|
|
||||||
|
- name: Upload artifacts
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: ${{ matrix.os }}
|
||||||
|
path: artifacts
|
||||||
|
|
||||||
|
- name: Release
|
||||||
|
uses: softprops/action-gh-release@v1
|
||||||
|
if: startsWith(github.ref, 'refs/tags/')
|
||||||
|
with:
|
||||||
|
files: 'artifacts/**'
|
||||||
|
prerelease: true
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Run `packer init`
|
||||||
|
run: |
|
||||||
|
cd ../dbgate-merged/packer
|
||||||
|
packer init ./aws-ubuntu.pkr.hcl
|
||||||
|
env:
|
||||||
|
AWS_ACCESS_KEY_ID: ${{secrets.AWS_ACCESS_KEY_ID}}
|
||||||
|
AWS_SECRET_ACCESS_KEY: ${{secrets.AWS_SECRET_ACCESS_KEY}}
|
||||||
|
AWS_DEFAULT_REGION: ${{secrets.AWS_DEFAULT_REGION}}
|
||||||
|
|
||||||
|
- name: Run `packer build`
|
||||||
|
run: |
|
||||||
|
cd ../dbgate-merged/packer
|
||||||
|
packer build ./aws-ubuntu.pkr.hcl
|
||||||
|
env:
|
||||||
|
AWS_ACCESS_KEY_ID: ${{secrets.AWS_ACCESS_KEY_ID}}
|
||||||
|
AWS_SECRET_ACCESS_KEY: ${{secrets.AWS_SECRET_ACCESS_KEY}}
|
||||||
|
AWS_DEFAULT_REGION: ${{secrets.AWS_DEFAULT_REGION}}
|
||||||
|
|
||||||
|
# - name: Install AWS CLI
|
||||||
|
# run: |
|
||||||
|
# curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
|
||||||
|
# unzip awscliv2.zip
|
||||||
|
# sudo ./aws/install
|
||||||
|
# sudo apt-get install jq -y
|
||||||
|
|
||||||
|
- name: Install jq
|
||||||
|
run: |
|
||||||
|
sudo apt-get install jq -y
|
||||||
|
|
||||||
|
- name: Delete old AMIs
|
||||||
|
run: |
|
||||||
|
cd ../dbgate-merged/packer
|
||||||
|
chmod +x delete-old-amis.sh
|
||||||
|
./delete-old-amis.sh
|
||||||
|
env:
|
||||||
|
AWS_ACCESS_KEY_ID: ${{secrets.AWS_ACCESS_KEY_ID}}
|
||||||
|
AWS_SECRET_ACCESS_KEY: ${{secrets.AWS_SECRET_ACCESS_KEY}}
|
||||||
|
AWS_DEFAULT_REGION: ${{secrets.AWS_DEFAULT_REGION}}
|
||||||
137
workflow-templates/build-docker.tpl.yaml
Normal file
137
workflow-templates/build-docker.tpl.yaml
Normal file
@@ -0,0 +1,137 @@
|
|||||||
|
_templates:
|
||||||
|
_community:
|
||||||
|
file: build-docker.yaml
|
||||||
|
string-replace:
|
||||||
|
"<<cd_merged>>": ''
|
||||||
|
"<<adjust>>": '--community'
|
||||||
|
_premium:
|
||||||
|
file: build-docker-pro.yaml
|
||||||
|
string-replace:
|
||||||
|
"<<cd_merged>>": |
|
||||||
|
cd ..
|
||||||
|
cd dbgate-merged
|
||||||
|
"<<adjust>>": '--premium'
|
||||||
|
|
||||||
|
name:
|
||||||
|
_community: Docker image Community
|
||||||
|
_premium: Docker image PREMIUM
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- 'v[0-9]+.[0-9]+.[0-9]+'
|
||||||
|
- _community: 'v[0-9]+.[0-9]+.[0-9]+-beta.[0-9]+'
|
||||||
|
_premium: 'v[0-9]+.[0-9]+.[0-9]+-premium-beta.[0-9]+'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
os: [ubuntu-22.04]
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Context
|
||||||
|
env:
|
||||||
|
GITHUB_CONTEXT: ${{ toJson(github) }}
|
||||||
|
run: echo "$GITHUB_CONTEXT"
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
fetch-depth: 1
|
||||||
|
|
||||||
|
- name: Docker meta
|
||||||
|
id: meta
|
||||||
|
uses: docker/metadata-action@v4
|
||||||
|
with:
|
||||||
|
images:
|
||||||
|
_community: dbgate/dbgate
|
||||||
|
_premium: dbgate/dbgate-premium
|
||||||
|
flavor: |
|
||||||
|
latest=false
|
||||||
|
tags: |
|
||||||
|
type=raw,value=beta,enable=${{ contains(github.ref_name, '-docker.') || contains(github.ref_name, '-beta.') }}
|
||||||
|
|
||||||
|
type=match,pattern=\d+.\d+.\d+,enable=${{ !contains(github.ref_name, '-docker.') && !contains(github.ref_name, '-beta.') }}
|
||||||
|
type=raw,value=latest,enable=${{ !contains(github.ref_name, '-docker.') && !contains(github.ref_name, '-beta.') }}
|
||||||
|
|
||||||
|
- name: Docker alpine meta
|
||||||
|
_if: _community
|
||||||
|
id: alpmeta
|
||||||
|
uses: docker/metadata-action@v4
|
||||||
|
with:
|
||||||
|
images: |
|
||||||
|
dbgate/dbgate
|
||||||
|
flavor: |
|
||||||
|
latest=false
|
||||||
|
tags: |
|
||||||
|
type=raw,value=beta-alpine,enable=${{ contains(github.ref_name, '-docker.') || contains(github.ref_name, '-beta.') }}
|
||||||
|
|
||||||
|
type=match,pattern=\d+.\d+.\d+,suffix=-alpine,enable=${{ !contains(github.ref_name, '-docker.') && !contains(github.ref_name, '-beta.') }}
|
||||||
|
type=raw,value=alpine,enable=${{ !contains(github.ref_name, '-docker.') && !contains(github.ref_name, '-beta.') }}
|
||||||
|
|
||||||
|
- name: Use Node.js 18.x
|
||||||
|
uses: actions/setup-node@v1
|
||||||
|
with:
|
||||||
|
node-version: 18.x
|
||||||
|
|
||||||
|
- _include: checkout-and-merge-pro
|
||||||
|
_if: _premium
|
||||||
|
|
||||||
|
- name: adjustPackageJson
|
||||||
|
run: |
|
||||||
|
<<cd_merged>>
|
||||||
|
node adjustPackageJson <<adjust>>
|
||||||
|
|
||||||
|
- name: yarn install
|
||||||
|
run: |
|
||||||
|
<<cd_merged>>
|
||||||
|
# yarn --version
|
||||||
|
# yarn config set network-timeout 300000
|
||||||
|
yarn install
|
||||||
|
|
||||||
|
- name: setCurrentVersion
|
||||||
|
run: |
|
||||||
|
<<cd_merged>>
|
||||||
|
yarn setCurrentVersion
|
||||||
|
|
||||||
|
- name: printSecrets
|
||||||
|
run: |
|
||||||
|
<<cd_merged>>
|
||||||
|
yarn printSecrets
|
||||||
|
env:
|
||||||
|
GIST_UPLOAD_SECRET : ${{secrets.GIST_UPLOAD_SECRET}}
|
||||||
|
- name: Prepare docker image
|
||||||
|
run: |
|
||||||
|
<<cd_merged>>
|
||||||
|
yarn run prepare:docker
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v2
|
||||||
|
- name: Login to DockerHub
|
||||||
|
uses: docker/login-action@v2
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
|
|
||||||
|
- name: Build and push
|
||||||
|
uses: docker/build-push-action@v3
|
||||||
|
with:
|
||||||
|
push: true
|
||||||
|
context:
|
||||||
|
_community: ./docker
|
||||||
|
_premium: ../dbgate-merged/docker
|
||||||
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
|
platforms:
|
||||||
|
_community: linux/amd64,linux/arm64,linux/arm/v7
|
||||||
|
_premium: linux/amd64,linux/arm64
|
||||||
|
|
||||||
|
- name: Build and push alpine
|
||||||
|
uses: docker/build-push-action@v3
|
||||||
|
_if: _community
|
||||||
|
with:
|
||||||
|
push: true
|
||||||
|
context: ./docker
|
||||||
|
file: ./docker/Dockerfile-alpine
|
||||||
|
tags: ${{ steps.alpmeta.outputs.tags }}
|
||||||
|
platforms: linux/amd64,linux/arm64,linux/arm/v7
|
||||||
102
workflow-templates/build-npm-pro.yaml
Normal file
102
workflow-templates/build-npm-pro.yaml
Normal file
@@ -0,0 +1,102 @@
|
|||||||
|
name: NPM packages PREMIUM
|
||||||
|
|
||||||
|
# on: [push]
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- 'v[0-9]+.[0-9]+.[0-9]+'
|
||||||
|
- 'v[0-9]+.[0-9]+.[0-9]+-alpha.[0-9]+'
|
||||||
|
|
||||||
|
# on:
|
||||||
|
# push:
|
||||||
|
# branches:
|
||||||
|
# - production
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
os: [ubuntu-22.04]
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Context
|
||||||
|
env:
|
||||||
|
GITHUB_CONTEXT: ${{ toJson(github) }}
|
||||||
|
run: echo "$GITHUB_CONTEXT"
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
fetch-depth: 1
|
||||||
|
- name: Use Node.js 18.x
|
||||||
|
uses: actions/setup-node@v1
|
||||||
|
with:
|
||||||
|
node-version: 18.x
|
||||||
|
|
||||||
|
- _include: checkout-and-merge-pro
|
||||||
|
|
||||||
|
- name: adjustNpmPackageJsonPremium
|
||||||
|
run: |
|
||||||
|
cd ..
|
||||||
|
cd dbgate-merged
|
||||||
|
node adjustNpmPackageJsonPremium
|
||||||
|
|
||||||
|
- name: Configure NPM token
|
||||||
|
env:
|
||||||
|
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||||
|
run: |
|
||||||
|
cd ..
|
||||||
|
cd dbgate-merged
|
||||||
|
npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
|
||||||
|
|
||||||
|
- name: Remove dbmodel - should be not published
|
||||||
|
run: |
|
||||||
|
cd ..
|
||||||
|
cd dbgate-merged
|
||||||
|
rm -rf packages/dbmodel
|
||||||
|
|
||||||
|
- name: yarn install
|
||||||
|
run: |
|
||||||
|
cd ..
|
||||||
|
cd dbgate-merged
|
||||||
|
yarn install
|
||||||
|
|
||||||
|
- name: setCurrentVersion
|
||||||
|
run: |
|
||||||
|
cd ..
|
||||||
|
cd dbgate-merged
|
||||||
|
yarn setCurrentVersion
|
||||||
|
|
||||||
|
- name: printSecrets
|
||||||
|
run: |
|
||||||
|
cd ..
|
||||||
|
cd dbgate-merged
|
||||||
|
yarn printSecrets
|
||||||
|
env:
|
||||||
|
GIST_UPLOAD_SECRET : ${{secrets.GIST_UPLOAD_SECRET}}
|
||||||
|
|
||||||
|
- name: Publish dbgate-api-premium
|
||||||
|
run: |
|
||||||
|
cd ..
|
||||||
|
cd dbgate-merged/packages/api
|
||||||
|
npm publish
|
||||||
|
|
||||||
|
- name: Publish dbgate-web-premium
|
||||||
|
run: |
|
||||||
|
cd ..
|
||||||
|
cd dbgate-merged/packages/web
|
||||||
|
npm publish
|
||||||
|
|
||||||
|
- name: Publish dbgate-serve-premium
|
||||||
|
run: |
|
||||||
|
cd ..
|
||||||
|
cd dbgate-merged/packages/serve
|
||||||
|
npm publish
|
||||||
|
|
||||||
|
- name: Publish dbgate-plugin-cosmosdb
|
||||||
|
run: |
|
||||||
|
cd ..
|
||||||
|
cd dbgate-merged/plugins/dbgate-plugin-cosmosdb
|
||||||
|
npm publish
|
||||||
156
workflow-templates/build-npm.yaml
Normal file
156
workflow-templates/build-npm.yaml
Normal file
@@ -0,0 +1,156 @@
|
|||||||
|
name: NPM packages
|
||||||
|
|
||||||
|
# on: [push]
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- 'v[0-9]+.[0-9]+.[0-9]+'
|
||||||
|
- 'v[0-9]+.[0-9]+.[0-9]+-alpha.[0-9]+'
|
||||||
|
|
||||||
|
# on:
|
||||||
|
# push:
|
||||||
|
# branches:
|
||||||
|
# - production
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
os: [ubuntu-22.04]
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Context
|
||||||
|
env:
|
||||||
|
GITHUB_CONTEXT: ${{ toJson(github) }}
|
||||||
|
run: echo "$GITHUB_CONTEXT"
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
fetch-depth: 1
|
||||||
|
- name: Use Node.js 18.x
|
||||||
|
uses: actions/setup-node@v1
|
||||||
|
with:
|
||||||
|
node-version: 18.x
|
||||||
|
|
||||||
|
- name: Configure NPM token
|
||||||
|
env:
|
||||||
|
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||||
|
run: |
|
||||||
|
npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
|
||||||
|
|
||||||
|
- name: yarn install
|
||||||
|
run: |
|
||||||
|
yarn install
|
||||||
|
|
||||||
|
- name: setCurrentVersion
|
||||||
|
run: |
|
||||||
|
yarn setCurrentVersion
|
||||||
|
|
||||||
|
- name: printSecrets
|
||||||
|
run: |
|
||||||
|
yarn printSecrets
|
||||||
|
env:
|
||||||
|
GIST_UPLOAD_SECRET : ${{secrets.GIST_UPLOAD_SECRET}}
|
||||||
|
|
||||||
|
- name: Publish types
|
||||||
|
working-directory: packages/types
|
||||||
|
run: |
|
||||||
|
npm publish
|
||||||
|
|
||||||
|
- name: Publish tools
|
||||||
|
working-directory: packages/tools
|
||||||
|
run: |
|
||||||
|
npm publish
|
||||||
|
|
||||||
|
- name: Publish sqltree
|
||||||
|
working-directory: packages/sqltree
|
||||||
|
run: |
|
||||||
|
npm publish
|
||||||
|
|
||||||
|
- name: Publish api
|
||||||
|
working-directory: packages/api
|
||||||
|
run: |
|
||||||
|
npm publish
|
||||||
|
|
||||||
|
- name: Publish datalib
|
||||||
|
working-directory: packages/datalib
|
||||||
|
run: |
|
||||||
|
npm publish
|
||||||
|
|
||||||
|
- name: Publish filterparser
|
||||||
|
working-directory: packages/filterparser
|
||||||
|
run: |
|
||||||
|
npm publish
|
||||||
|
|
||||||
|
- name: Publish web
|
||||||
|
working-directory: packages/web
|
||||||
|
run: |
|
||||||
|
npm publish
|
||||||
|
|
||||||
|
- name: Publish dbgate-serve
|
||||||
|
working-directory: packages/serve
|
||||||
|
run: |
|
||||||
|
npm publish
|
||||||
|
|
||||||
|
- name: Publish dbmodel
|
||||||
|
working-directory: packages/dbmodel
|
||||||
|
run: |
|
||||||
|
npm publish
|
||||||
|
|
||||||
|
- name: Publish dbgate-plugin-csv
|
||||||
|
working-directory: plugins/dbgate-plugin-csv
|
||||||
|
run: |
|
||||||
|
npm publish
|
||||||
|
|
||||||
|
- name: Publish dbgate-plugin-xml
|
||||||
|
working-directory: plugins/dbgate-plugin-xml
|
||||||
|
run: |
|
||||||
|
npm publish
|
||||||
|
|
||||||
|
- name: Publish dbgate-plugin-excel
|
||||||
|
working-directory: plugins/dbgate-plugin-excel
|
||||||
|
run: |
|
||||||
|
npm publish
|
||||||
|
|
||||||
|
- name: Publish dbgate-plugin-mssql
|
||||||
|
working-directory: plugins/dbgate-plugin-mssql
|
||||||
|
run: |
|
||||||
|
npm publish
|
||||||
|
|
||||||
|
- name: Publish dbgate-plugin-mysql
|
||||||
|
working-directory: plugins/dbgate-plugin-mysql
|
||||||
|
run: |
|
||||||
|
npm publish
|
||||||
|
|
||||||
|
- name: Publish dbgate-plugin-mongo
|
||||||
|
working-directory: plugins/dbgate-plugin-mongo
|
||||||
|
run: |
|
||||||
|
npm publish
|
||||||
|
|
||||||
|
- name: Publish dbgate-plugin-postgres
|
||||||
|
working-directory: plugins/dbgate-plugin-postgres
|
||||||
|
run: |
|
||||||
|
npm publish
|
||||||
|
|
||||||
|
- name: Publish dbgate-plugin-sqlite
|
||||||
|
working-directory: plugins/dbgate-plugin-sqlite
|
||||||
|
run: |
|
||||||
|
npm publish
|
||||||
|
|
||||||
|
- name: Publish dbgate-plugin-redis
|
||||||
|
working-directory: plugins/dbgate-plugin-redis
|
||||||
|
run: |
|
||||||
|
npm publish
|
||||||
|
|
||||||
|
- name: Publish dbgate-plugin-oracle
|
||||||
|
working-directory: plugins/dbgate-plugin-oracle
|
||||||
|
run: |
|
||||||
|
npm publish
|
||||||
|
|
||||||
|
- name: Publish dbgate-plugin-clickhouse
|
||||||
|
working-directory: plugins/dbgate-plugin-clickhouse
|
||||||
|
run: |
|
||||||
|
npm publish
|
||||||
20
workflow-templates/includes.tpl.yaml
Normal file
20
workflow-templates/includes.tpl.yaml
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
_module: true
|
||||||
|
|
||||||
|
checkout-and-merge-pro:
|
||||||
|
- name: Checkout dbgate/dbgate-pro
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
repository: dbgate/dbgate-pro
|
||||||
|
token: ${{ secrets.GH_TOKEN }}
|
||||||
|
path: dbgate-pro
|
||||||
|
- name: Merge dbgate/dbgate-pro
|
||||||
|
run: |
|
||||||
|
mkdir ../dbgate-pro
|
||||||
|
mv dbgate-pro/* ../dbgate-pro/
|
||||||
|
cd ..
|
||||||
|
mkdir dbgate-merged
|
||||||
|
cd dbgate-pro
|
||||||
|
cd sync
|
||||||
|
yarn
|
||||||
|
node sync.js --nowatch
|
||||||
|
cd ..
|
||||||
104
workflow-templates/run-tests.yaml
Normal file
104
workflow-templates/run-tests.yaml
Normal file
@@ -0,0 +1,104 @@
|
|||||||
|
name: Run tests
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
- develop
|
||||||
|
- 'feature/**'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test-runner:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container: node:18
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Install dependencies for cypress
|
||||||
|
run: |
|
||||||
|
apt-get update
|
||||||
|
apt-get install -y xvfb libgtk2.0-0 libgtk-3-0 libgbm-dev libnotify-dev libnss3 libxss1 libasound2 libxtst6
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
fetch-depth: 1
|
||||||
|
- name: yarn install
|
||||||
|
run: |
|
||||||
|
yarn install
|
||||||
|
- name: Build packer dist for cypress
|
||||||
|
run: |
|
||||||
|
yarn prepare:packer
|
||||||
|
- name: yarn install cypress
|
||||||
|
run: |
|
||||||
|
cd e2e-tests
|
||||||
|
yarn install
|
||||||
|
- name: Run Cypress tests
|
||||||
|
run: |
|
||||||
|
cd e2e-tests
|
||||||
|
yarn test:ci
|
||||||
|
- name: Integration tests
|
||||||
|
run: |
|
||||||
|
cd integration-tests
|
||||||
|
yarn test:ci
|
||||||
|
# yarn wait:ci
|
||||||
|
- name: Filter parser tests
|
||||||
|
if: always()
|
||||||
|
run: |
|
||||||
|
cd packages/filterparser
|
||||||
|
yarn test:ci
|
||||||
|
- name: Datalib (perspective) tests
|
||||||
|
if: always()
|
||||||
|
run: |
|
||||||
|
cd packages/datalib
|
||||||
|
yarn test:ci
|
||||||
|
- uses: tanmen/jest-reporter@v1
|
||||||
|
if: always()
|
||||||
|
with:
|
||||||
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
result-file: integration-tests/result.json
|
||||||
|
action-name: Integration tests
|
||||||
|
- uses: tanmen/jest-reporter@v1
|
||||||
|
if: always()
|
||||||
|
with:
|
||||||
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
result-file: packages/filterparser/result.json
|
||||||
|
action-name: Filter parser test results
|
||||||
|
- uses: tanmen/jest-reporter@v1
|
||||||
|
if: always()
|
||||||
|
with:
|
||||||
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
result-file: packages/datalib/result.json
|
||||||
|
action-name: Datalib (perspectives) test results
|
||||||
|
|
||||||
|
services:
|
||||||
|
postgres:
|
||||||
|
image: postgres
|
||||||
|
env:
|
||||||
|
POSTGRES_PASSWORD: Pwd2020Db
|
||||||
|
options: >-
|
||||||
|
--health-cmd pg_isready
|
||||||
|
--health-interval 10s
|
||||||
|
--health-timeout 5s
|
||||||
|
--health-retries 5
|
||||||
|
|
||||||
|
mysql:
|
||||||
|
image: mysql:8.0.18
|
||||||
|
env:
|
||||||
|
MYSQL_ROOT_PASSWORD: Pwd2020Db
|
||||||
|
|
||||||
|
mssql:
|
||||||
|
image: mcr.microsoft.com/mssql/server
|
||||||
|
env:
|
||||||
|
ACCEPT_EULA: Y
|
||||||
|
SA_PASSWORD: Pwd2020Db
|
||||||
|
MSSQL_PID: Express
|
||||||
|
|
||||||
|
clickhouse:
|
||||||
|
image: bitnami/clickhouse:24.8.4
|
||||||
|
env:
|
||||||
|
CLICKHOUSE_ADMIN_PASSWORD: Pwd2020Db
|
||||||
|
|
||||||
|
oracle:
|
||||||
|
image: gvenzl/oracle-xe:21-slim
|
||||||
|
env:
|
||||||
|
ORACLE_PASSWORD: Pwd2020Db
|
||||||
|
|
||||||
|
# cockroachdb:
|
||||||
|
# image: cockroachdb/cockroach
|
||||||
Reference in New Issue
Block a user