{"id":30385299,"url":"https://github.com/chartdb/chartdb-action","last_synced_at":"2026-02-14T20:34:47.086Z","repository":{"id":309733161,"uuid":"1037267285","full_name":"chartdb/chartdb-action","owner":"chartdb","description":null,"archived":false,"fork":false,"pushed_at":"2025-08-13T12:59:58.000Z","size":32,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-07T12:48:29.446Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chartdb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-08-13T10:10:58.000Z","updated_at":"2025-08-13T13:04:07.000Z","dependencies_parsed_at":"2025-08-13T15:10:00.492Z","dependency_job_id":"ab8f3dfa-af29-47e6-b908-6bdd89a51a8c","html_url":"https://github.com/chartdb/chartdb-action","commit_stats":null,"previous_names":["chartdb/chartdb-action"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/chartdb/chartdb-action","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chartdb%2Fchartdb-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chartdb%2Fchartdb-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chartdb%2Fchartdb-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chartdb%2Fchartdb-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chartdb","download_url":"https://codeload.github.com/chartdb/chartdb-action/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chartdb%2Fchartdb-action/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29455358,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-14T15:52:44.973Z","status":"ssl_error","status_checked_at":"2026-02-14T15:52:11.208Z","response_time":53,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-08-21T02:12:21.513Z","updated_at":"2026-02-14T20:34:47.069Z","avatar_url":"https://github.com/chartdb.png","language":null,"readme":"# ChartDB Database Sync Action\n\nAutomatically sync your database schema with [ChartDB](https://chartdb.io) to keep your ER diagrams up-to-date.\n\n## Features\n\n- 🔄 Automatic database schema synchronization\n- 📊 Updates ChartDB diagrams in real-time\n- 🔒 Secure handling of credentials via GitHub Secrets\n- 🐳 Docker-based for consistent execution\n- 🗄️ Supports PostgreSQL, MySQL, SQL Server, MariaDB, SQLite, ClickHouse, CockroachDB, and Oracle\n\n## Usage\n\n### Basic Example\n\n```yaml\nname: Sync Database with ChartDB\non:\n  push:\n    branches: [ main ]\n  schedule:\n    - cron: '0 0 * * *'  # Daily sync at midnight\n\njobs:\n  sync:\n    runs-on: ubuntu-latest\n    steps:\n      - name: Sync Database Schema\n        uses: chartdb/chartdb-action@v1\n        with:\n          db-host: ${{ secrets.DB_HOST }}\n          db-port: '5432'\n          db-database: ${{ secrets.DB_DATABASE }}\n          db-username: ${{ secrets.DB_USERNAME }}\n          db-password: ${{ secrets.DB_PASSWORD }}\n          db-type: 'postgresql'\n          chartdb-api-token: ${{ secrets.CHARTDB_API_TOKEN }}\n          chartdb-diagram-id: ${{ secrets.CHARTDB_DIAGRAM_ID }}\n```\n\n### With GitHub-hosted Database\n\n```yaml\nname: Sync GitHub Actions Database\non:\n  workflow_dispatch:\n  push:\n    paths:\n      - 'migrations/**'\n      - 'schema/**'\n\njobs:\n  sync:\n    runs-on: ubuntu-latest\n    services:\n      postgres:\n        image: postgres:15\n        env:\n          POSTGRES_USER: testuser\n          POSTGRES_PASSWORD: testpass\n          POSTGRES_DB: testdb\n        options: \u003e-\n          --health-cmd pg_isready\n          --health-interval 10s\n          --health-timeout 5s\n          --health-retries 5\n        ports:\n          - 5432:5432\n\n    steps:\n      - uses: actions/checkout@v4\n      \n      - name: Run migrations\n        run: |\n          # Your migration commands here\n          \n      - name: Sync with ChartDB\n        uses: chartdb/chartdb-action@v1\n        with:\n          db-host: 'localhost'\n          db-port: '5432'\n          db-database: 'testdb'\n          db-username: 'testuser'\n          db-password: 'testpass'\n          db-type: 'postgresql'\n          chartdb-api-token: ${{ secrets.CHARTDB_API_TOKEN }}\n          chartdb-diagram-id: ${{ secrets.CHARTDB_DIAGRAM_ID }}\n```\n\n## Inputs\n\n| Input | Description | Required | Default |\n|-------|-------------|----------|---------|\n| `db-host` | Database host address | Yes | - |\n| `db-port` | Database port | No | `5432` |\n| `db-database` | Database name | Yes | - |\n| `db-username` | Database username | Yes | - |\n| `db-password` | Database password (use secrets!) | No | - |\n| `db-type` | Database type (`postgresql`, `mysql`, `sql_server`, `sqlite`, `mariadb`, `clickhouse`, `cockroachdb`, `oracle`) | Yes | - |\n| `chartdb-api-token` | ChartDB API token (use secrets!) | Yes | - |\n| `chartdb-diagram-id` | ChartDB diagram ID to sync with | Yes | - |\n| `network` | Docker network mode | No | `host` |\n\n## Outputs\n\n| Output | Description |\n|--------|-------------|\n| `status` | Sync status (`success` or `failed`) |\n\n## Setup\n\n### 1. Get ChartDB Credentials\n\n1. Sign up at [ChartDB](https://chartdb.io)\n2. Create or open your diagram\n3. Navigate to diagram settings\n4. Generate an API token\n5. Copy your diagram ID from the URL or settings\n\n### 2. Configure GitHub Secrets\n\nAdd the following secrets to your repository:\n\n1. Go to Settings → Secrets and variables → Actions\n2. Add these secrets:\n   - `DB_HOST`: Your database host\n   - `DB_DATABASE`: Your database name\n   - `DB_USERNAME`: Database username\n   - `DB_PASSWORD`: Database password\n   - `CHARTDB_API_TOKEN`: Your ChartDB API token\n   - `CHARTDB_DIAGRAM_ID`: Your ChartDB diagram ID\n\n### 3. Add Workflow\n\nCreate `.github/workflows/chartdb-sync.yml` in your repository with one of the examples above.\n\n## Security Considerations\n\n- **Always use GitHub Secrets** for sensitive information\n- Never commit credentials directly in workflow files\n- Consider using environment-specific secrets for different stages\n- Use least-privilege database users for syncing\n- Rotate API tokens regularly\n\n## Database Support\n\n### PostgreSQL\n```yaml\ndb-type: 'postgresql'\ndb-port: '5432'  # default\n```\n\n### MySQL\n```yaml\ndb-type: 'mysql'\ndb-port: '3306'  # default\n```\n\n### MariaDB\n```yaml\ndb-type: 'mariadb'\ndb-port: '3306'  # default\n```\n\n### Microsoft SQL Server\n```yaml\ndb-type: 'sql_server'\ndb-port: '1433'  # default\n```\n\n## Advanced Usage\n\n### Conditional Sync\n\n```yaml\n- name: Sync with ChartDB\n  if: github.ref == 'refs/heads/main'\n  uses: chartdb/chartdb-action@v1\n  with:\n    # ... your configuration\n```\n\n### Multiple Environments\n\n```yaml\njobs:\n  sync-staging:\n    runs-on: ubuntu-latest\n    environment: staging\n    steps:\n      - uses: chartdb/chartdb-action@v1\n        with:\n          db-host: ${{ secrets.STAGING_DB_HOST }}\n          chartdb-diagram-id: ${{ secrets.STAGING_DIAGRAM_ID }}\n          # ... other staging config\n\n  sync-production:\n    runs-on: ubuntu-latest\n    environment: production\n    if: github.ref == 'refs/heads/main'\n    steps:\n      - uses: chartdb/chartdb-action@v1\n        with:\n          db-host: ${{ secrets.PROD_DB_HOST }}\n          chartdb-diagram-id: ${{ secrets.PROD_DIAGRAM_ID }}\n          # ... other production config\n```\n\n### With Status Check\n\n```yaml\n- name: Sync with ChartDB\n  id: chartdb-sync\n  uses: chartdb/chartdb-action@v1\n  with:\n    # ... your configuration\n\n- name: Check sync status\n  if: steps.chartdb-sync.outputs.status == 'failed'\n  run: |\n    echo \"ChartDB sync failed! Check the logs above.\"\n    exit 1\n```\n\n## Troubleshooting\n\n### Connection Issues\n\nIf the action fails to connect to your database:\n\n1. **Check network accessibility**: Ensure your database is accessible from GitHub Actions runners\n2. **Verify credentials**: Double-check all secrets are correctly set\n3. **Firewall rules**: Add GitHub Actions IP ranges to your database firewall if needed\n4. **Use self-hosted runners**: For private databases, consider using self-hosted runners\n\n### Docker Network Modes\n\nThe action uses `host` network mode by default. For other configurations:\n\n```yaml\nwith:\n  network: 'bridge'  # or 'none', 'container:name', etc.\n```\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## License\n\nMIT\n\n## Support\n\n- 📧 Email: support@chartdb.io\n- 🐛 Issues: [GitHub Issues](https://github.com/chartdb/chartdb-action/issues)\n- 📖 Documentation: [ChartDB Docs](https://docs.chartdb.io)\n\n## Related\n\n- [ChartDB](https://chartdb.io) - Visual database design tool\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchartdb%2Fchartdb-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchartdb%2Fchartdb-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchartdb%2Fchartdb-action/lists"}