Skip to content

GitHub Action to setup a PostgreSQL database

License

Notifications You must be signed in to change notification settings

CasperWA/postgresql-action

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PostgreSQL Docker Action

This GitHub Action sets up a PostgreSQL database. It utilizes the PostgreSQL Docker images.

Note: This is a fork from here, which is a fork from here, and originally created here. It was first forked due to inactivity from the original maintainer.

Usage

See action.yml.

Example:

steps:
- uses: CasperWA/[email protected]
  with:
    postgresql version: '12'  # See https://hub.docker.com/_/postgres for available versions
    postgresql db: my_db
    postgresql init scripts: init-db/sql
    postgresql conf: max_prepared_transactions=100
    postgresql port: 2345
    postgresql auth: trust

Inputs

postgresql version

Optional: Version of PostgreSQL to use.
Default: latest

postgresql db

Optional: Name for the database that is created.
Default: PostgreSQL default.

postgresql user

Optional: Create the specified user with superuser power.
Default: PostgreSQL default.

postgresql password

Optional: Superuser password.
Default: PostgreSQL default.

postgresql init scripts

Optional: Relative path (from repository root) to directory containing database init scripts.
Default: PostgreSQL default.

postgresql conf

Optional: postgres configurations.
Default: PostgreSQL default.

postgresql port

Optional: Port to bind to the docker. Also the port to be exposed by the docker.
Default: 5432

postgresql auth

Optional: Set auth-method for host connections (see PostgreSQL docs under auth-method for list of recognized values and their meaning).
Default: PostgreSQL default.

License

The scripts and documentation in this project are released under the MIT License

About

GitHub Action to setup a PostgreSQL database

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 54.2%
  • JavaScript 39.0%
  • Dockerfile 6.8%