Skip to content

Commit be2942b

Browse files
authored
Merge branch 'main' into patch-2
2 parents 3a0d36c + e505e31 commit be2942b

File tree

8,152 files changed

+1713478
-93535
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

8,152 files changed

+1713478
-93535
lines changed

.DS_Store

-6 KB
Binary file not shown.
Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
name: Build lowcoder docker images
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
imageTag:
7+
type: choice
8+
description: 'Choose a tag for built docker image(s)'
9+
required: true
10+
default: 'latest'
11+
options:
12+
- latest
13+
- test
14+
- 2.4.6
15+
build_allinone:
16+
type: boolean
17+
description: 'Build the All-In-One image'
18+
default: true
19+
build_frontend:
20+
type: boolean
21+
description: 'Build the Frontend image'
22+
default: true
23+
build_nodeservice:
24+
type: boolean
25+
description: 'Build the Node service image'
26+
default: true
27+
build_apiservice:
28+
type: boolean
29+
description: 'Build the API service image'
30+
default: true
31+
push:
32+
branches: dev
33+
paths:
34+
- 'client/**'
35+
- 'server/**'
36+
- 'deploy/docker/**'
37+
release:
38+
types: [released]
39+
40+
jobs:
41+
build:
42+
runs-on: ubuntu-latest
43+
steps:
44+
- name: Set environment variables
45+
shell: bash
46+
run: |
47+
# Get the short SHA of last commit
48+
echo "SHORT_SHA=$(echo ${{ github.sha }} | cut -c1-7)" >> "${GITHUB_ENV}"
49+
50+
# Get branch name - we don't use github.ref_head_name since we don't build on PRs
51+
echo "BRANCH_NAME=${{ github.ref_name }}" >> "${GITHUB_ENV}"
52+
53+
# Set docker image tag
54+
echo "IMAGE_TAG=${{ inputs.imageTag || github.ref_name }}" >> "${GITHUB_ENV}"
55+
56+
# Control which images to build
57+
echo "BUILD_ALLINONE=${{ inputs.build_allinone || true }}" >> "${GITHUB_ENV}"
58+
echo "BUILD_FRONTEND=${{ inputs.build_frontend || true }}" >> "${GITHUB_ENV}"
59+
echo "BUILD_NODESERVICE=${{ inputs.build_nodeservice || true }}" >> "${GITHUB_ENV}"
60+
echo "BUILD_APISERVICE=${{ inputs.build_apiservice || true }}" >> "${GITHUB_ENV}"
61+
62+
- name: Checkout lowcoder source
63+
uses: actions/checkout@v4
64+
with:
65+
ref: ${{ env.BRANCH_NAME }}
66+
67+
- name: Log into Docker Hub
68+
uses: docker/login-action@v3
69+
with:
70+
username: ${{ secrets.DOCKER_LOGIN }}
71+
password: ${{ secrets.DOCKER_PASSWORD }}
72+
73+
- name: Setup Docker Buildx with cloud driver
74+
uses: docker/setup-buildx-action@v3
75+
with:
76+
version: "lab:latest"
77+
driver: cloud
78+
endpoint: "lowcoderorg/lowcoder-cloud-builder"
79+
80+
- name: Build and push the all-in-one image
81+
if: ${{ env.BUILD_ALLINONE == 'true' }}
82+
uses: docker/build-push-action@v6
83+
env:
84+
NODE_ENV: production
85+
with:
86+
file: ./deploy/docker/Dockerfile
87+
build-args: |
88+
REACT_APP_ENV=production
89+
REACT_APP_COMMIT_ID="dev #${{ env.SHORT_SHA }}"
90+
platforms: |
91+
linux/amd64
92+
linux/arm64
93+
push: true
94+
tags: lowcoderorg/lowcoder-ce:${{ env.IMAGE_TAG }}
95+
96+
- name: Build and push the frontend image
97+
if: ${{ env.BUILD_FRONTEND == 'true' }}
98+
uses: docker/build-push-action@v6
99+
env:
100+
NODE_ENV: production
101+
with:
102+
file: ./deploy/docker/Dockerfile
103+
target: lowcoder-ce-frontend
104+
build-args: |
105+
REACT_APP_ENV=production
106+
REACT_APP_COMMIT_ID="dev #${{ env.SHORT_SHA }}"
107+
platforms: |
108+
linux/amd64
109+
linux/arm64
110+
push: true
111+
tags: lowcoderorg/lowcoder-ce-frontend:${{ env.IMAGE_TAG }}
112+
113+
- name: Build and push the node service image
114+
if: ${{ env.BUILD_NODESERVICE == 'true' }}
115+
uses: docker/build-push-action@v6
116+
with:
117+
file: ./deploy/docker/Dockerfile
118+
target: lowcoder-ce-node-service
119+
platforms: |
120+
linux/amd64
121+
linux/arm64
122+
push: true
123+
tags: lowcoderorg/lowcoder-ce-node-service:${{ env.IMAGE_TAG }}
124+
125+
- name: Build and push the API service image
126+
if: ${{ env.BUILD_APISERVICE == 'true' }}
127+
uses: docker/build-push-action@v6
128+
with:
129+
file: ./deploy/docker/Dockerfile
130+
target: lowcoder-ce-api-service
131+
platforms: |
132+
linux/amd64
133+
linux/arm64
134+
push: true
135+
tags: lowcoderorg/lowcoder-ce-api-service:${{ env.IMAGE_TAG }}
136+
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
2+
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
3+
4+
name: Publish Lowcoder CLI
5+
6+
on:
7+
push:
8+
branches: [ "dev" ]
9+
10+
jobs:
11+
publish-package:
12+
if: ${{ github.repositoryUrl == 'git://github.com/lowcoder-org/lowcoder.git'}}
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v3
17+
18+
- name: Check version changes
19+
uses: EndBug/version-check@v1
20+
id: check
21+
with:
22+
diff-search: true
23+
static-checking: localIsNew
24+
file-name: client/packages/lowcoder-cli/package.json
25+
file-url: https://unpkg.com/lowcoder-cli@latest/package.json
26+
27+
- name: Version update detected
28+
if: steps.check.outputs.changed == 'true'
29+
run: 'echo "Version change found! New version: ${{ steps.check.outputs.version }} (${{ steps.check.outputs.type }})"'
30+
31+
- name: Set up Node.js for NPM
32+
if: steps.check.outputs.changed == 'true'
33+
uses: actions/setup-node@v3
34+
with:
35+
node-version: 16
36+
registry-url: https://registry.npmjs.org/
37+
38+
- name: Install dependencies
39+
if: steps.check.outputs.changed == 'true'
40+
uses: borales/[email protected]
41+
with:
42+
cmd: install
43+
dir: client/packages/lowcoder-cli
44+
45+
- name: Publish package to NPM
46+
if: steps.check.outputs.changed == 'true'
47+
run: npm publish
48+
working-directory: client/packages/lowcoder-cli
49+
env:
50+
NODE_AUTH_TOKEN: ${{ secrets.LOWCODERNPMBOT }}
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
2+
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
3+
4+
name: Publish Lowcoder Comps
5+
6+
on:
7+
push:
8+
branches: [ "dev" ]
9+
10+
jobs:
11+
publish-package:
12+
if: ${{ github.repositoryUrl == 'git://github.com/lowcoder-org/lowcoder.git'}}
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v3
17+
18+
- name: Check version changes
19+
uses: EndBug/version-check@v1
20+
id: check
21+
with:
22+
diff-search: true
23+
static-checking: localIsNew
24+
file-name: client/packages/lowcoder-comps/package.json
25+
file-url: https://unpkg.com/lowcoder-comps@latest/package.json
26+
27+
- name: Version update detected
28+
if: steps.check.outputs.changed == 'true'
29+
run: 'echo "Version change found! New version: ${{ steps.check.outputs.version }} (${{ steps.check.outputs.type }})"'
30+
31+
- name: Set up Node.js for NPM
32+
if: steps.check.outputs.changed == 'true'
33+
uses: actions/setup-node@v3
34+
with:
35+
node-version: 16
36+
registry-url: https://registry.npmjs.org/
37+
38+
- name: Install dependencies
39+
if: steps.check.outputs.changed == 'true'
40+
uses: borales/[email protected]
41+
with:
42+
cmd: install
43+
dir: client/packages/lowcoder-comps
44+
45+
- name: Publish
46+
if: steps.check.outputs.changed == 'true'
47+
uses: borales/[email protected]
48+
with:
49+
cmd: build_publish
50+
dir: client/packages/lowcoder-comps
51+
env:
52+
NODE_AUTH_TOKEN: ${{ secrets.LOWCODERNPMBOT }}
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
2+
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
3+
4+
name: Publish Lowcoder Core
5+
6+
on:
7+
push:
8+
branches: [ "dev" ]
9+
10+
jobs:
11+
publish-package:
12+
if: ${{ github.repositoryUrl == 'git://github.com/lowcoder-org/lowcoder.git'}}
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v3
17+
18+
- name: Check version changes
19+
uses: EndBug/version-check@v1
20+
id: check
21+
with:
22+
diff-search: true
23+
static-checking: localIsNew
24+
file-name: client/packages/lowcoder-core/package.json
25+
file-url: https://unpkg.com/lowcoder-core@latest/package.json
26+
27+
- name: Version update detected
28+
if: steps.check.outputs.changed == 'true'
29+
run: 'echo "Version change found! New version: ${{ steps.check.outputs.version }} (${{ steps.check.outputs.type }})"'
30+
31+
- name: Set up Node.js for NPM
32+
if: steps.check.outputs.changed == 'true'
33+
uses: actions/setup-node@v3
34+
with:
35+
node-version: 16
36+
registry-url: https://registry.npmjs.org/
37+
38+
- name: Install dependencies
39+
if: steps.check.outputs.changed == 'true'
40+
uses: borales/[email protected]
41+
with:
42+
cmd: install
43+
dir: client/packages/lowcoder-core
44+
45+
- name: Publish package to NPM
46+
if: steps.check.outputs.changed == 'true'
47+
run: npm publish
48+
working-directory: client/packages/lowcoder-core
49+
env:
50+
NODE_AUTH_TOKEN: ${{ secrets.LOWCODERNPMBOT }}
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
2+
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
3+
4+
name: Publish Lowcoder SDK
5+
6+
on:
7+
push:
8+
branches: [ "dev" ]
9+
10+
jobs:
11+
publish-package:
12+
if: ${{ github.repositoryUrl == 'git://github.com/lowcoder-org/lowcoder.git'}}
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v3
17+
18+
- name: Check version changes
19+
uses: EndBug/version-check@v1
20+
id: check
21+
with:
22+
diff-search: true
23+
static-checking: localIsNew
24+
file-name: client/packages/lowcoder-sdk/package.json
25+
file-url: https://unpkg.com/lowcoder-sdk@latest/package.json
26+
27+
- name: Version update detected
28+
if: steps.check.outputs.changed == 'true'
29+
run: 'echo "Version change found! New version: ${{ steps.check.outputs.version }} (${{ steps.check.outputs.type }})"'
30+
31+
- name: Set up Node.js for NPM
32+
if: steps.check.outputs.changed == 'true'
33+
uses: actions/setup-node@v3
34+
with:
35+
node-version: 16
36+
registry-url: https://registry.npmjs.org/
37+
38+
- name: Install dependencies
39+
if: steps.check.outputs.changed == 'true'
40+
uses: borales/[email protected]
41+
with:
42+
cmd: install
43+
dir: client/packages/lowcoder-sdk
44+
45+
- name: Build Package
46+
if: steps.check.outputs.changed == 'true'
47+
uses: borales/[email protected]
48+
with:
49+
cmd: build
50+
dir: client/packages/lowcoder-sdk
51+
52+
- name: Publish package to NPM
53+
if: steps.check.outputs.changed == 'true'
54+
run: npm publish
55+
working-directory: client/packages/lowcoder-sdk
56+
env:
57+
NODE_AUTH_TOKEN: ${{ secrets.LOWCODERNPMBOT }}

.gitignore

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,16 @@ client/.yarn/cache/*.zip
55
server/node-service/.yarn/cache/*.zip
66
.metadata/
77
.DS_Store
8+
client/node_modules/
9+
client/packages/lowcoder-plugin-demo/.yarn/install-state.gz
10+
client/packages/lowcoder-plugin-demo/yarn.lock
11+
client/packages/lowcoder-plugin-demo/.yarn/cache/@types-node-npm-16.18.68-56f72825c0-094ae9ed80.zip
12+
application-dev.yml
13+
application-lowcoder.yml
14+
application-debug.yaml
15+
application-dev-localhost.yaml
16+
.vscode/settings.json
17+
.vscode/launch.json
18+
server/api-service/lowcoder-server/src/main/resources/application-local-dev.yaml
19+
translations/locales/node_modules/
20+
.vscode/settings.json

.vscode/settings.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"workbench.colorCustomizations": {
3+
"activityBar.background": "#2A3012",
4+
"titleBar.activeBackground": "#3B431A",
5+
"titleBar.activeForeground": "#F9FAF2"
6+
},
7+
"java.debug.settings.onBuildFailureProceed": true,
8+
"java.configuration.updateBuildConfiguration": "automatic"
9+
}

0 commit comments

Comments
 (0)