Skip to content

fix: add db_connection permission action to resolve db connection per… #327

fix: add db_connection permission action to resolve db connection per…

fix: add db_connection permission action to resolve db connection per… #327

Workflow file for this run

name: Build and Push to Docker Registry
on:
push:
branches:
- develop
tags:
- 'v*'
paths:
- 'apps/nestjs-backend/**'
- 'apps/nextjs-app/**'
- 'packages/core/**'
- 'packages/sdk/**'
jobs:
build-push:
runs-on: ubuntu-latest
strategy:
matrix:
target: [app, db-migrate]
include:
- target: app
file: Dockerfile
image: teable
- target: db-migrate
file: Dockerfile.db-migrate
image: teable-db-migrate
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Login to GitHub container registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.PACKAGES_KEY }}
- name: Login to Docker Hub registry
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_HUB_NAME }}
password: ${{ secrets.DOCKER_HUB_AK }}
- name: Login to Ali container registry
uses: docker/login-action@v3
with:
registry: registry.cn-shenzhen.aliyuncs.com
username: ${{ secrets.ALI_DOCKER_USERNAME }}
password: ${{ secrets.ALI_DOCKER_PASSWORD }}
- uses: actions/setup-node@v4
with:
node-version: 20.9.0
- name: ⚙️ Install zx
run: npm install -g zx
- name: ⚙️ Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: |
registry.cn-shenzhen.aliyuncs.com/teable/${{ matrix.image }}
ghcr.io/teableio/${{ matrix.image }}
docker.io/teableio/${{ matrix.image }}
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
# set latest tag for default branch
type=raw,value=latest,enable={{is_default_branch}}
- name: ⚙️ Set up QEMU
uses: docker/setup-qemu-action@v3
- name: ⚙️ Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: 📦 Build and push
run: |
zx scripts/build-image.mjs --file=dockers/teable/${{ matrix.file }} \
--build-arg="ENABLE_CSP=false" \
--tag="${{ steps.meta.outputs.tags }}" \
--platforms="linux/amd64,linux/arm64" \
--push