nocobase/.github/workflows/build-docker-image.yml

112 lines
3.4 KiB
YAML
Raw Normal View History

name: Build docker image
2024-02-08 03:35:59 +00:00
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
2022-10-28 15:17:47 +00:00
push:
branches:
- 'main'
2024-06-30 11:30:45 +00:00
- 'next'
2022-10-28 15:17:47 +00:00
paths:
- 'packages/**'
- 'Dockerfile'
- '.github/workflows/build-docker-image.yml'
pull_request:
branches:
- '**'
paths:
- 'packages/**'
2022-12-13 05:37:32 +00:00
- 'docker/nocobase/**'
- 'Dockerfile'
- '.github/workflows/build-docker-image.yml'
jobs:
build-and-push:
2022-12-13 05:37:32 +00:00
if: github.event.pull_request.head.repo.fork != true
runs-on: ubuntu-latest
services:
verdaccio:
image: verdaccio/verdaccio:5
ports:
- 4873:4873
steps:
feat: collection inheritance (#1069) * chore: test * chore: inherited-collection class * feat: collection inherit * feat: collection inherit * feat: inhertis sync runner * test: get parents fields * feat: collection inherit style promote * feat: sync * feat: sync alter table * feat: pgOnly Test * fix: child collection create api * feat: replace parent field * chore: reload parent fields * test: reload collection test * feat: details are displayed according to conditions * fix: typo * feat: inheritance map class * chore: is parent node * feat: display where child row created from * fix: find with appends * feat: add parent collection fields * fix: create table * feat: load fields for all children * refactor: sync fields from parent * test: has one field inhertis * feat: replace child association target * feat: should not replace child field when parent field update * test: should update inherit field when parent field update * feat: only the blocks directly inherited from the current data are displayed * fix: inherit from multiple collections * feat: only the blocks directly inherited from the current data are displayed * fix: test * feat: parent collection expend * fix: test * test: belongsToMany inherits * test: belongsToMany inherits * feat: block display * feat: collection inherite * feat: collection inherite * feat: multiple inherits * fix: sync runner * feat: collection inherite * feat: collecton inherits * feat: cannot be modified after inheritance and saving * feat: collection inherit for graph * feat: collection inherits * fix: drop inhertied field * fix: should throw error when type conflit * feat: output inherited fields * feat: bulk update collection fields * feat: collection fields * feat: collection fields * test: create relation with child table * fix: test * fix: test * fix: test * feat: style impove * test: should not replace field with difference type * feat: add text * fix: throw error when replace field with difference type * feat: overriding * feat: kan bankanban group fields * feat: calendar block fields * feat: kan bankanban group fields * fix: test * feat: relationship fields * feat: should delete child's field when parent field deleted * feat: foreign key filter * fix: build error & multiple inherit destory field * fix: test * chore: disable error * feat: no recursive update associations (#1091) * feat: update associations * fix(collection-manager): should update uiSchema * chore: flip if * feat: mutile inherits * feat: db dialect * feat: inherits show by database * chore: git hash into docker image * fix: js gzip * fix: dockerfile * chore: error message * feat: overriding * feat: overriding * feat: overriding * feat: local * feat: filter fields by interface * fix: database logging env * test: replace hasOne target * feat: add view * feat: local * chore: enable error * fix: update docs Co-authored-by: katherinehhh <katherine_15995@163.com> Co-authored-by: chenos <chenlinxh@gmail.com>
2022-11-16 04:53:58 +00:00
- name: Checkout
uses: actions/checkout@v3
Feat/collection templates (#1124) * feat: add collection templates * feat: collection templates * feat: collection templates * feat: collection templates * feat: collection templates * feat: collection templates * feat: calendar collection template * feat: no id does not support sorting * feat: collection template edit * feat: collectiom templates code improve * feat: collection template supports configurable field interface * feat: collection template supports configurable field interface * feat: establish relation field when there is no id * feat: collection templates * feat: collection templates locale * feat: calendar collection * feat: calendar collection default fields * feat: code optimization * feat: code optimization * feat: code optimization * feat: collectin template fix * feat: add sample-custom-collection-template * feat: code optimization * feat: code optimization * feat: code optimization * feat: code optimization * feat: import code * feat: collection template local * feat: code opimization * feat: code opimization * feat: code opimization * feat: code opimization * feat: code opimization * feat: collection template local * feat: collection template local * fix(collection-manager): exclude reverse parameters when overriding * feat: update docs * feat: disabled * feat: improve code * feat: update submodule * feat: submodules: true * fix: token * fix: with ssh-key * fix: update dockerfile * fix: ci * fix: ci * fix: ci * fix: ci * fix: --no-verify-access * fix: ci * fix: ci * fix: ci * fix: missing env * fix: env Co-authored-by: chenos <chenlinxh@gmail.com> Co-authored-by: chareice <chareice@live.com>
2022-11-29 03:31:30 +00:00
with:
ssh-key: ${{ secrets.SUBMODULE_SSH_KEY }}
submodules: true
feat: collection inheritance (#1069) * chore: test * chore: inherited-collection class * feat: collection inherit * feat: collection inherit * feat: inhertis sync runner * test: get parents fields * feat: collection inherit style promote * feat: sync * feat: sync alter table * feat: pgOnly Test * fix: child collection create api * feat: replace parent field * chore: reload parent fields * test: reload collection test * feat: details are displayed according to conditions * fix: typo * feat: inheritance map class * chore: is parent node * feat: display where child row created from * fix: find with appends * feat: add parent collection fields * fix: create table * feat: load fields for all children * refactor: sync fields from parent * test: has one field inhertis * feat: replace child association target * feat: should not replace child field when parent field update * test: should update inherit field when parent field update * feat: only the blocks directly inherited from the current data are displayed * fix: inherit from multiple collections * feat: only the blocks directly inherited from the current data are displayed * fix: test * feat: parent collection expend * fix: test * test: belongsToMany inherits * test: belongsToMany inherits * feat: block display * feat: collection inherite * feat: collection inherite * feat: multiple inherits * fix: sync runner * feat: collection inherite * feat: collecton inherits * feat: cannot be modified after inheritance and saving * feat: collection inherit for graph * feat: collection inherits * fix: drop inhertied field * fix: should throw error when type conflit * feat: output inherited fields * feat: bulk update collection fields * feat: collection fields * feat: collection fields * test: create relation with child table * fix: test * fix: test * fix: test * feat: style impove * test: should not replace field with difference type * feat: add text * fix: throw error when replace field with difference type * feat: overriding * feat: kan bankanban group fields * feat: calendar block fields * feat: kan bankanban group fields * fix: test * feat: relationship fields * feat: should delete child's field when parent field deleted * feat: foreign key filter * fix: build error & multiple inherit destory field * fix: test * chore: disable error * feat: no recursive update associations (#1091) * feat: update associations * fix(collection-manager): should update uiSchema * chore: flip if * feat: mutile inherits * feat: db dialect * feat: inherits show by database * chore: git hash into docker image * fix: js gzip * fix: dockerfile * chore: error message * feat: overriding * feat: overriding * feat: overriding * feat: local * feat: filter fields by interface * fix: database logging env * test: replace hasOne target * feat: add view * feat: local * chore: enable error * fix: update docs Co-authored-by: katherinehhh <katherine_15995@163.com> Co-authored-by: chenos <chenlinxh@gmail.com>
2022-11-16 04:53:58 +00:00
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
feat: collection inheritance (#1069) * chore: test * chore: inherited-collection class * feat: collection inherit * feat: collection inherit * feat: inhertis sync runner * test: get parents fields * feat: collection inherit style promote * feat: sync * feat: sync alter table * feat: pgOnly Test * fix: child collection create api * feat: replace parent field * chore: reload parent fields * test: reload collection test * feat: details are displayed according to conditions * fix: typo * feat: inheritance map class * chore: is parent node * feat: display where child row created from * fix: find with appends * feat: add parent collection fields * fix: create table * feat: load fields for all children * refactor: sync fields from parent * test: has one field inhertis * feat: replace child association target * feat: should not replace child field when parent field update * test: should update inherit field when parent field update * feat: only the blocks directly inherited from the current data are displayed * fix: inherit from multiple collections * feat: only the blocks directly inherited from the current data are displayed * fix: test * feat: parent collection expend * fix: test * test: belongsToMany inherits * test: belongsToMany inherits * feat: block display * feat: collection inherite * feat: collection inherite * feat: multiple inherits * fix: sync runner * feat: collection inherite * feat: collecton inherits * feat: cannot be modified after inheritance and saving * feat: collection inherit for graph * feat: collection inherits * fix: drop inhertied field * fix: should throw error when type conflit * feat: output inherited fields * feat: bulk update collection fields * feat: collection fields * feat: collection fields * test: create relation with child table * fix: test * fix: test * fix: test * feat: style impove * test: should not replace field with difference type * feat: add text * fix: throw error when replace field with difference type * feat: overriding * feat: kan bankanban group fields * feat: calendar block fields * feat: kan bankanban group fields * fix: test * feat: relationship fields * feat: should delete child's field when parent field deleted * feat: foreign key filter * fix: build error & multiple inherit destory field * fix: test * chore: disable error * feat: no recursive update associations (#1091) * feat: update associations * fix(collection-manager): should update uiSchema * chore: flip if * feat: mutile inherits * feat: db dialect * feat: inherits show by database * chore: git hash into docker image * fix: js gzip * fix: dockerfile * chore: error message * feat: overriding * feat: overriding * feat: overriding * feat: local * feat: filter fields by interface * fix: database logging env * test: replace hasOne target * feat: add view * feat: local * chore: enable error * fix: update docs Co-authored-by: katherinehhh <katherine_15995@163.com> Co-authored-by: chenos <chenlinxh@gmail.com>
2022-11-16 04:53:58 +00:00
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
driver-opts: network=host
feat: collection inheritance (#1069) * chore: test * chore: inherited-collection class * feat: collection inherit * feat: collection inherit * feat: inhertis sync runner * test: get parents fields * feat: collection inherit style promote * feat: sync * feat: sync alter table * feat: pgOnly Test * fix: child collection create api * feat: replace parent field * chore: reload parent fields * test: reload collection test * feat: details are displayed according to conditions * fix: typo * feat: inheritance map class * chore: is parent node * feat: display where child row created from * fix: find with appends * feat: add parent collection fields * fix: create table * feat: load fields for all children * refactor: sync fields from parent * test: has one field inhertis * feat: replace child association target * feat: should not replace child field when parent field update * test: should update inherit field when parent field update * feat: only the blocks directly inherited from the current data are displayed * fix: inherit from multiple collections * feat: only the blocks directly inherited from the current data are displayed * fix: test * feat: parent collection expend * fix: test * test: belongsToMany inherits * test: belongsToMany inherits * feat: block display * feat: collection inherite * feat: collection inherite * feat: multiple inherits * fix: sync runner * feat: collection inherite * feat: collecton inherits * feat: cannot be modified after inheritance and saving * feat: collection inherit for graph * feat: collection inherits * fix: drop inhertied field * fix: should throw error when type conflit * feat: output inherited fields * feat: bulk update collection fields * feat: collection fields * feat: collection fields * test: create relation with child table * fix: test * fix: test * fix: test * feat: style impove * test: should not replace field with difference type * feat: add text * fix: throw error when replace field with difference type * feat: overriding * feat: kan bankanban group fields * feat: calendar block fields * feat: kan bankanban group fields * fix: test * feat: relationship fields * feat: should delete child's field when parent field deleted * feat: foreign key filter * fix: build error & multiple inherit destory field * fix: test * chore: disable error * feat: no recursive update associations (#1091) * feat: update associations * fix(collection-manager): should update uiSchema * chore: flip if * feat: mutile inherits * feat: db dialect * feat: inherits show by database * chore: git hash into docker image * fix: js gzip * fix: dockerfile * chore: error message * feat: overriding * feat: overriding * feat: overriding * feat: local * feat: filter fields by interface * fix: database logging env * test: replace hasOne target * feat: add view * feat: local * chore: enable error * fix: update docs Co-authored-by: katherinehhh <katherine_15995@163.com> Co-authored-by: chenos <chenlinxh@gmail.com>
2022-11-16 04:53:58 +00:00
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: |
nocobase/nocobase
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
- name: Login to Aliyun Container Registry
uses: docker/login-action@v2
with:
registry: ${{ secrets.ALI_DOCKER_REGISTRY }}
username: ${{ secrets.ALI_DOCKER_USERNAME }}
password: ${{ secrets.ALI_DOCKER_PASSWORD }}
2024-06-19 02:29:20 +00:00
- name: Login to Aliyun Container Registry (Public)
uses: docker/login-action@v2
with:
registry: ${{ secrets.ALI_DOCKER_PUBLIC_REGISTRY }}
username: ${{ secrets.ALI_DOCKER_USERNAME }}
password: ${{ secrets.ALI_DOCKER_PASSWORD }}
- name: Login to Docker Hub
2024-06-30 11:30:45 +00:00
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/next'
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Set tags
id: set-tags
run: |
2024-06-30 11:30:45 +00:00
if [[ "${{ github.ref }}" == "refs/heads/main" ]] || [[ "${{ github.ref }}" == "refs/heads/next" ]]; then
2024-06-19 02:29:20 +00:00
echo "::set-output name=tags::${{ steps.meta.outputs.tags }},${{ secrets.ALI_DOCKER_REGISTRY }}/${{ steps.meta.outputs.tags }},${{ secrets.ALI_DOCKER_PUBLIC_REGISTRY }}/${{ steps.meta.outputs.tags }}"
else
2024-06-19 02:29:20 +00:00
echo "::set-output name=tags::${{ secrets.ALI_DOCKER_REGISTRY }}/${{ steps.meta.outputs.tags }}"
fi
feat: collection inheritance (#1069) * chore: test * chore: inherited-collection class * feat: collection inherit * feat: collection inherit * feat: inhertis sync runner * test: get parents fields * feat: collection inherit style promote * feat: sync * feat: sync alter table * feat: pgOnly Test * fix: child collection create api * feat: replace parent field * chore: reload parent fields * test: reload collection test * feat: details are displayed according to conditions * fix: typo * feat: inheritance map class * chore: is parent node * feat: display where child row created from * fix: find with appends * feat: add parent collection fields * fix: create table * feat: load fields for all children * refactor: sync fields from parent * test: has one field inhertis * feat: replace child association target * feat: should not replace child field when parent field update * test: should update inherit field when parent field update * feat: only the blocks directly inherited from the current data are displayed * fix: inherit from multiple collections * feat: only the blocks directly inherited from the current data are displayed * fix: test * feat: parent collection expend * fix: test * test: belongsToMany inherits * test: belongsToMany inherits * feat: block display * feat: collection inherite * feat: collection inherite * feat: multiple inherits * fix: sync runner * feat: collection inherite * feat: collecton inherits * feat: cannot be modified after inheritance and saving * feat: collection inherit for graph * feat: collection inherits * fix: drop inhertied field * fix: should throw error when type conflit * feat: output inherited fields * feat: bulk update collection fields * feat: collection fields * feat: collection fields * test: create relation with child table * fix: test * fix: test * fix: test * feat: style impove * test: should not replace field with difference type * feat: add text * fix: throw error when replace field with difference type * feat: overriding * feat: kan bankanban group fields * feat: calendar block fields * feat: kan bankanban group fields * fix: test * feat: relationship fields * feat: should delete child's field when parent field deleted * feat: foreign key filter * fix: build error & multiple inherit destory field * fix: test * chore: disable error * feat: no recursive update associations (#1091) * feat: update associations * fix(collection-manager): should update uiSchema * chore: flip if * feat: mutile inherits * feat: db dialect * feat: inherits show by database * chore: git hash into docker image * fix: js gzip * fix: dockerfile * chore: error message * feat: overriding * feat: overriding * feat: overriding * feat: local * feat: filter fields by interface * fix: database logging env * test: replace hasOne target * feat: add view * feat: local * chore: enable error * fix: update docs Co-authored-by: katherinehhh <katherine_15995@163.com> Co-authored-by: chenos <chenlinxh@gmail.com>
2022-11-16 04:53:58 +00:00
- name: Build and push
uses: docker/build-push-action@v3
with:
context: .
file: Dockerfile
feat: collection inheritance (#1069) * chore: test * chore: inherited-collection class * feat: collection inherit * feat: collection inherit * feat: inhertis sync runner * test: get parents fields * feat: collection inherit style promote * feat: sync * feat: sync alter table * feat: pgOnly Test * fix: child collection create api * feat: replace parent field * chore: reload parent fields * test: reload collection test * feat: details are displayed according to conditions * fix: typo * feat: inheritance map class * chore: is parent node * feat: display where child row created from * fix: find with appends * feat: add parent collection fields * fix: create table * feat: load fields for all children * refactor: sync fields from parent * test: has one field inhertis * feat: replace child association target * feat: should not replace child field when parent field update * test: should update inherit field when parent field update * feat: only the blocks directly inherited from the current data are displayed * fix: inherit from multiple collections * feat: only the blocks directly inherited from the current data are displayed * fix: test * feat: parent collection expend * fix: test * test: belongsToMany inherits * test: belongsToMany inherits * feat: block display * feat: collection inherite * feat: collection inherite * feat: multiple inherits * fix: sync runner * feat: collection inherite * feat: collecton inherits * feat: cannot be modified after inheritance and saving * feat: collection inherit for graph * feat: collection inherits * fix: drop inhertied field * fix: should throw error when type conflit * feat: output inherited fields * feat: bulk update collection fields * feat: collection fields * feat: collection fields * test: create relation with child table * fix: test * fix: test * fix: test * feat: style impove * test: should not replace field with difference type * feat: add text * fix: throw error when replace field with difference type * feat: overriding * feat: kan bankanban group fields * feat: calendar block fields * feat: kan bankanban group fields * fix: test * feat: relationship fields * feat: should delete child's field when parent field deleted * feat: foreign key filter * fix: build error & multiple inherit destory field * fix: test * chore: disable error * feat: no recursive update associations (#1091) * feat: update associations * fix(collection-manager): should update uiSchema * chore: flip if * feat: mutile inherits * feat: db dialect * feat: inherits show by database * chore: git hash into docker image * fix: js gzip * fix: dockerfile * chore: error message * feat: overriding * feat: overriding * feat: overriding * feat: local * feat: filter fields by interface * fix: database logging env * test: replace hasOne target * feat: add view * feat: local * chore: enable error * fix: update docs Co-authored-by: katherinehhh <katherine_15995@163.com> Co-authored-by: chenos <chenlinxh@gmail.com>
2022-11-16 04:53:58 +00:00
build-args: |
VERDACCIO_URL=http://localhost:4873/
COMMIT_HASH=${{ github.sha }}
push: true
tags: ${{ steps.set-tags.outputs.tags }}
- name: Deploy NocoBase
env:
IMAGE_TAG: ${{ steps.meta.outputs.tags }}
run: |
echo $IMAGE_TAG
export APP_NAME=$(echo $IMAGE_TAG | cut -d ":" -f 2)
echo $APP_NAME
2023-02-08 01:20:17 +00:00
curl --retry 2 --location --request POST "${{secrets.NOCOBASE_DEPLOY_HOST}}$APP_NAME" \
--header 'Content-Type: application/json' \
-d "{
\"tag\": \"$APP_NAME\",
\"dialect\": \"postgres\"
}"