f053f42b6d
Mirror to GitHub / mirror (push) Successful in 19s
Test and Lint / backend-test (push) Successful in 1m8s
Test and Lint / frontend-test (push) Successful in 2m11s
Version and Release / version-bump (push) Successful in 34s
Version and Release / trigger-drone (push) Successful in 3s
continuous-integration/drone/push Build is passing
Critical fixes for database compatibility issues:
INSERT operations:
- Fix all INSERT queries to use .returning('id')
- Handle both PostgreSQL (returns objects) and SQLite (returns IDs)
- Fixed in: events.js, adminArchives.js, adminEvents-enhanced.js, create-test-event.js
Date operations:
- Replace SQLite-specific db.raw("datetime('now', '+30 days')")
- Use JavaScript Date objects for cross-database compatibility
- Fixed in: adminArchives.js
Database utilities:
- Add dbCompat.js utility for handling database differences
- Provides consistent API for inserts, dates, booleans, and DB-specific operations
- Centralized database compatibility logic
Migration:
- Add migration 023 documenting PostgreSQL compatibility requirements
- Ensures future developers are aware of compatibility needs
This resolves all 'not iterable' errors and ensures the application
works correctly with both PostgreSQL (production) and SQLite (development).
58 lines
2.0 KiB
YAML
58 lines
2.0 KiB
YAML
name: Mirror to GitHub
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
mirror:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 0 # Full history needed for mirroring
|
|
|
|
- name: Setup Git
|
|
run: |
|
|
git config --global user.name "the-luap"
|
|
git config --global user.email "paul-nothaft@hotmail.de"
|
|
|
|
- name: Create filtered branch
|
|
run: |
|
|
# Create a new branch for GitHub
|
|
git checkout -b github-mirror
|
|
|
|
# Remove sensitive files/directories
|
|
# Example: Remove .env files, private configs, etc.
|
|
git rm -r --cached .env* || true
|
|
git rm -r --cached backend/.env* || true
|
|
git rm -r --cached frontend/.env* || true
|
|
git rm -r --cached docker-compose.prod.yml || true
|
|
git rm -r --cached .claudedocs/ || true
|
|
git rm -r --cached backend/data/ || true
|
|
git rm -r --cached backend/storage/ || true
|
|
git rm -r --cached .gitea/ || true
|
|
git rm -r --cached scripts/install-gitea-runner.sh || true
|
|
git rm -r --cached .drone* || true
|
|
git rm -r --cached .github-mirror-exclude || true
|
|
git rm -r --cached .gitattributes-github || true
|
|
git rm -r --cached photo-sharing-prd.md || true
|
|
git rm -r --cached CLAUDE.md || true
|
|
git rm -r --cached PRODUCTION_DEPLOYMENT_GUIDE.md || true
|
|
git rm -r --cached logs/ || true
|
|
|
|
|
|
# Commit the changes
|
|
git commit -m "Remove sensitive files for GitHub mirror" || true
|
|
|
|
- name: Push to GitHub
|
|
env:
|
|
GITHUBTOKEN: ${{ secrets.GITHUBTOKEN }}
|
|
run: |
|
|
# Add GitHub remote
|
|
git remote add github https://x-access-token:${GITHUBTOKEN}@github.com/the-luap/picpeak.git
|
|
|
|
# Force push the filtered branch to GitHub main
|
|
git push github github-mirror:main --force |