- Move MIX_ENV and DATABASE_URL to job-level env vars
- Removes need to set them on individual steps
- Ensures all database operations use correct hostname (postgres)
- Fixes 'connection refused' errors from hardcoded localhost in test.exs
- Add postgresql-client to system dependencies
- Fixes 'pg_isready: command not found' error in CI
- Required for database readiness check before tests
- Remove port mapping (5432:5432) to avoid port conflicts on runner
- Use 'postgres' hostname instead of 'localhost' to access service
- Service containers in Actions are accessible via their service name
- Fixes 'port is already allocated' error on self-hosted runners
- Split deps and _build into separate caches for better granularity
- Add Elixir/OTP version to cache keys for version-specific builds
- Include lib/**/*.ex hash in build cache for change detection
- Add apt package caching to skip redundant system dependency installs
- Use version-type: strict in setup-beam for consistent versions
- Improves cache hit rate and reduces build times significantly
- Add pg_isready wait loop to ensure PostgreSQL service is fully ready
- Run mix ecto.create explicitly before tests to prevent connection errors
- Fixes 'connection refused' errors when database service is still starting
Added test job that must pass before building Docker image:
- Code formatting check (mix format --check-formatted)
- Compilation with warnings as errors
- Credo static analysis (--strict mode)
- Full test suite with PostgreSQL + TimescaleDB
Build job now depends on test job passing (needs: test).
This prevents broken code from being deployed to production.
The punycode module deprecation warning in Node.js is coming from
actions/checkout@v6. Downgrading to v4 which is more stable and
doesn't use the deprecated punycode module.
Fixed two CI/CD issues:
1. Docker daemon not accessible
- Added explicit dockerd startup step
- Configured buildx to use docker-container driver
- Driver creates its own buildkitd instance
2. Node.js punycode deprecation warning
- Downgraded actions/checkout from v6 to v4
- v4 is more stable and doesn't use deprecated punycode module
Changes ensure the workflow runs successfully in Forgejo Actions runners
that may not have Docker socket access by default.
Switch deployment pipeline from GitLab Agent kubectl to FluxCD image
automation. CI now only builds and pushes tagged images to Forgejo
registry; FluxCD detects new tags and updates the deployment manifest.
Fix Ecto.MultipleResultsError on /dashboard when a device has multiple
Preseem access point records by using limit(1) instead of Repo.get_by.
Replace inline cache with dedicated buildcache tag that stores all
intermediate builder layers. Unchanged stages like deps and compile
will be pulled from cache instead of rebuilt.
Add node:22-bookworm container image since ubuntu:latest lacks Node.js
required by JavaScript-based actions. Update checkout to v6 and
build-push-action to v6.