name: Compose database move # Plays the Postgres 16 -> 18 move in docker-compose.yml against real # containers: a v1.45 database with every migration applied, then the current # compose file's `db-upgrade` on its first start, a second start, a move cut # short, an emptied new volume and a new install. The service runs once on an # operator's host and has no second chance there, so every change to the # compose file or to the check runs it here first. # `scripts/compose-db-upgrade-check.sh` is the same check, runnable locally. on: pull_request: branches: [main] paths: - docker-compose.yml - scripts/compose-db-upgrade-check.sh - .github/workflows/compose-db-upgrade.yml push: branches: [main] paths: - docker-compose.yml - scripts/compose-db-upgrade-check.sh - .github/workflows/compose-db-upgrade.yml workflow_dispatch: permissions: contents: read jobs: move: name: Postgres 16 -> 18 move runs-on: ubuntu-24.04 timeout-minutes: 20 steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 # The check reads the v1.45 compose file from its tag. - name: Fetch the v1.45.0 tag run: git fetch --no-tags --depth=1 origin tag v1.45.0 - uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0 - uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 with: node-version: 22 cache: pnpm - run: pnpm install --frozen-lockfile - name: Move check run: bash scripts/compose-db-upgrade-check.sh