Skip to content

add start-postgres composite action#7

Merged
markatto merged 4 commits into
mainfrom
mark/start-postgres-action
Jun 1, 2026
Merged

add start-postgres composite action#7
markatto merged 4 commits into
mainfrom
mark/start-postgres-action

Conversation

@markatto

@markatto markatto commented May 15, 2026

Copy link
Copy Markdown
Contributor

PE-171

Reusable shim for services: { postgres: ... } on ARC runners, which can't use services: (no docker daemon). Installs postgres via apt-get, starts it on localhost:5432 with trust auth.

- uses: lightsparkdev/.github/actions/start-postgres@v1
  with: { version: "16", database: "mydb" }

Inputs: version (default "16"), database (optional createdb), password (optional ALTER USER; only if client code reads a literal).

Verified working: https://github.com/lightsparkdev/.github/actions/runs/26787381168

markatto added 4 commits May 14, 2026 20:40
Installs postgres directly on the runner via apt-get and starts it on
localhost:5432 with trust auth. Drop-in for `services: { postgres: ... }`
on ARC runners (where the docker daemon isn't available).

Inputs: version (default 16), database (optional createdb), password
(optional, only if client code wants a literal).
@markatto markatto marked this pull request as ready for review June 1, 2026 23:06
@markatto markatto merged commit 2ed452e into main Jun 1, 2026
@markatto markatto deleted the mark/start-postgres-action branch June 1, 2026 23:06
markatto added a commit that referenced this pull request Jun 1, 2026
The chown ran before apt-get install. Works on GH-hosted images
(postgres user baked in) but fails on the minimal ARC runner image —
`postgresql-N` postinst is what creates the user. Moves chown after
install.

#7 verified only on hosted; first downstream ARC caller
(lightsparkdev/webdev#27434) hit `chown: invalid user:
'postgres:postgres'`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant