GitHub Actions: How to set custom options on a Postgres service

  docker, github-actions, postgresql

Our package uses postgres to store data, thus we need postgres for the tests.

Adding the postgres service and user is easy, but we rely on the enabled prepared_transactions feature.

Looking at doing

$ docker run -d --name some-postgres -e POSTGRES_PASSWORD=mysecretpassword postgres -c max_prepared_transactions=10

would be the way to do this, but GHA does docker create and docker start, the workflow services/options seems to allow to pass options only to docker create. can set a bunch of options, but does not go that far either.

Any ideas how to get this done?

Source: Docker Questions