first commit
Security: Sync from Public / sync-from-public (push) Has been cancelled
Test: Benchmark Nightly / build (push) Has been cancelled
Test: Benchmark Nightly / Notify Cats on failure (push) Has been cancelled
CI: Python / Checks (push) Has been cancelled
Test: Evals Python / Workflow Comparison Python (push) Has been cancelled
Util: Check Docs URLs / check-docs-urls (push) Has been cancelled
Test: Visual Storybook / Cloudflare Pages (push) Has been cancelled
Test: E2E Performance / build-and-test-performance (push) Has been cancelled
Test: Workflows Nightly / Run Workflow Tests (push) Has been cancelled
Util: Cleanup CI Docker Images / Delete stale CI images (push) Has been cancelled
Test: Benchmark Destroy Env / build (push) Has been cancelled
Util: Update Node Popularity / update-popularity (push) Has been cancelled
Test: E2E Coverage Weekly / Coverage Tests (push) Has been cancelled
Security: Sync from Public / sync-from-public (push) Has been cancelled
Test: Benchmark Nightly / build (push) Has been cancelled
Test: Benchmark Nightly / Notify Cats on failure (push) Has been cancelled
CI: Python / Checks (push) Has been cancelled
Test: Evals Python / Workflow Comparison Python (push) Has been cancelled
Util: Check Docs URLs / check-docs-urls (push) Has been cancelled
Test: Visual Storybook / Cloudflare Pages (push) Has been cancelled
Test: E2E Performance / build-and-test-performance (push) Has been cancelled
Test: Workflows Nightly / Run Workflow Tests (push) Has been cancelled
Util: Cleanup CI Docker Images / Delete stale CI images (push) Has been cancelled
Test: Benchmark Destroy Env / build (push) Has been cancelled
Util: Update Node Popularity / update-popularity (push) Has been cancelled
Test: E2E Coverage Weekly / Coverage Tests (push) Has been cancelled
This commit is contained in:
@@ -0,0 +1,84 @@
|
||||
name: 'Util: Data Tooling'
|
||||
|
||||
# TODO: Uncomment this after it works on a manual invocation
|
||||
# on:
|
||||
# pull_request:
|
||||
# branches:
|
||||
# - '**'
|
||||
# - '!release/*'
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
sqlite-export-sqlite-import:
|
||||
name: sqlite database export -> sqlite database import
|
||||
runs-on: blacksmith-2vcpu-ubuntu-2204
|
||||
outputs:
|
||||
db_changed: ${{ steps.paths-filter.outputs.db == 'true' }}
|
||||
steps:
|
||||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
# with:
|
||||
# ref: refs/pull/${{ github.event.pull_request.number }}/merge
|
||||
|
||||
- name: Check for frontend changes
|
||||
uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
|
||||
id: paths-filter
|
||||
with:
|
||||
filters: |
|
||||
db:
|
||||
- packages/@n8n/db/**
|
||||
- packages/cli/**
|
||||
- name: Setup, build and export sqlite
|
||||
if: steps.paths-filter.outputs.db == 'true'
|
||||
uses: ./.github/actions/setup-nodejs
|
||||
with:
|
||||
build-command: |
|
||||
pnpm build
|
||||
./packages/cli/bin/n8n export:entities --outputDir packages/cli/commands/export/outputs
|
||||
./packages/cli/bin/n8n import:entities --inputDir packages/cli/commands/export/outputs --truncateTables
|
||||
postgres-export-postgres-import:
|
||||
name: postgres export -> postgres import
|
||||
runs-on: blacksmith-2vcpu-ubuntu-2204
|
||||
outputs:
|
||||
db_changed: ${{ steps.paths-filter.outputs.db == 'true' }}
|
||||
env:
|
||||
DB_TYPE: postgresdb
|
||||
DB_POSTGRESDB_DATABASE: n8n
|
||||
DB_POSTGRESDB_HOST: localhost
|
||||
DB_POSTGRESDB_PORT: 5432
|
||||
DB_POSTGRESDB_USER: postgres
|
||||
DB_POSTGRESDB_PASSWORD: password
|
||||
DB_POSTGRESDB_POOL_SIZE: 1 # Detect connection pooling deadlocks
|
||||
steps:
|
||||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
# with:
|
||||
# ref: refs/pull/${{ github.event.pull_request.number }}/merge
|
||||
|
||||
- name: Check for db changes
|
||||
uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
|
||||
id: paths-filter
|
||||
with:
|
||||
filters: |
|
||||
db:
|
||||
- packages/@n8n/db/**
|
||||
- packages/cli/**
|
||||
|
||||
- name: Setup and Build
|
||||
if: steps.paths-filter.outputs.db == 'true'
|
||||
uses: ./.github/actions/setup-nodejs
|
||||
|
||||
- name: Start Postgres
|
||||
if: steps.paths-filter.outputs.db == 'true'
|
||||
uses: isbang/compose-action@802a148945af6399a338c7906c267331b39a71af # v2.0.0
|
||||
with:
|
||||
compose-file: ./.github/docker-compose.yml
|
||||
services: |
|
||||
postgres
|
||||
|
||||
- name: Export postgres
|
||||
if: steps.paths-filter.outputs.db == 'true'
|
||||
run: ./packages/cli/bin/n8n export:entities --outputDir packages/cli/commands/export/outputs
|
||||
- name: Import postgres
|
||||
if: steps.paths-filter.outputs.db == 'true'
|
||||
run: ./packages/cli/bin/n8n import:entities --inputDir packages/cli/commands/export/outputs --truncateTables
|
||||
Reference in New Issue
Block a user