mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-27 00:56:01 +00:00
fix
This commit is contained in:
@@ -42,6 +42,8 @@ function processJsonStep(json, args) {
|
|||||||
if (conditionMatch(item._if, args)) {
|
if (conditionMatch(item._if, args)) {
|
||||||
res.push(_.omit(item, ['_if']));
|
res.push(_.omit(item, ['_if']));
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
res.push(item);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
@@ -120,7 +122,7 @@ function processFiles() {
|
|||||||
function deleteOldFiles() {
|
function deleteOldFiles() {
|
||||||
const files = fs.readdirSync(outdir);
|
const files = fs.readdirSync(outdir);
|
||||||
for (const file of files) {
|
for (const file of files) {
|
||||||
fs.unlink(path.join(outdir, file));
|
fs.unlinkSync(path.join(outdir, file));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,110 +0,0 @@
|
|||||||
name: Docker image PREMIUM
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
tags:
|
|
||||||
- 'v[0-9]+.[0-9]+.[0-9]+'
|
|
||||||
- '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: |
|
|
||||||
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: Use Node.js 18.x
|
|
||||||
uses: actions/setup-node@v1
|
|
||||||
with:
|
|
||||||
node-version: 18.x
|
|
||||||
|
|
||||||
- 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 docker image
|
|
||||||
run: |
|
|
||||||
cd ..
|
|
||||||
cd dbgate-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: ../dbgate-merged/docker
|
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
|
||||||
platforms: linux/amd64,linux/arm64
|
|
||||||
@@ -77,11 +77,11 @@ jobs:
|
|||||||
|
|
||||||
- _include:
|
- _include:
|
||||||
_name: checkout-dbgate-pro
|
_name: checkout-dbgate-pro
|
||||||
_if: _premium
|
_if: _premium
|
||||||
|
|
||||||
- _include:
|
- _include:
|
||||||
_name: merge-dbgate-pro
|
_name: merge-dbgate-pro
|
||||||
_if: _premium
|
_if: _premium
|
||||||
|
|
||||||
- name: adjustPackageJson
|
- name: adjustPackageJson
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
@@ -1,106 +0,0 @@
|
|||||||
name: Docker image
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
tags:
|
|
||||||
- 'v[0-9]+.[0-9]+.[0-9]+'
|
|
||||||
- 'v[0-9]+.[0-9]+.[0-9]+-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: |
|
|
||||||
dbgate/dbgate
|
|
||||||
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
|
|
||||||
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
|
|
||||||
|
|
||||||
- name: adjustPackageJson
|
|
||||||
run: |
|
|
||||||
node adjustPackageJson --community
|
|
||||||
|
|
||||||
- name: yarn install
|
|
||||||
run: |
|
|
||||||
# yarn --version
|
|
||||||
# yarn config set network-timeout 300000
|
|
||||||
yarn install
|
|
||||||
|
|
||||||
- name: setCurrentVersion
|
|
||||||
run: |
|
|
||||||
yarn setCurrentVersion
|
|
||||||
|
|
||||||
- name: printSecrets
|
|
||||||
run: |
|
|
||||||
yarn printSecrets
|
|
||||||
env:
|
|
||||||
GIST_UPLOAD_SECRET : ${{secrets.GIST_UPLOAD_SECRET}}
|
|
||||||
- name: Prepare docker image
|
|
||||||
run: |
|
|
||||||
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: ./docker
|
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
|
||||||
platforms: linux/amd64,linux/arm64,linux/arm/v7
|
|
||||||
|
|
||||||
- name: Build and push alpine
|
|
||||||
uses: docker/build-push-action@v3
|
|
||||||
with:
|
|
||||||
push: true
|
|
||||||
context: ./docker
|
|
||||||
file: ./docker/Dockerfile-alpine
|
|
||||||
tags: ${{ steps.alpmeta.outputs.tags }}
|
|
||||||
platforms: linux/amd64,linux/arm64,linux/arm/v7
|
|
||||||
Reference in New Issue
Block a user