11# setup-postgres
22
3+ [ ![ GitHub] ( https://img.shields.io/badge/github-ikalnytskyi/action--setup--postgres-8da0cb?logo=github )] ( https://github.com/ikalnytskyi/action-setup-postgres )
4+ [ ![ CI build] ( https://github.com/ikalnytskyi/action-setup-postgres/actions/workflows/ci.yml/badge.svg )] ( https://github.com/ikalnytskyi/action-setup-postgres/actions )
5+ [ ![ Marketplace] ( https://img.shields.io/badge/market-setup--postgres-6F42C1?logo=github )] ( https://github.com/marketplace/actions/setup-postgresql-for-linux-macos-windows )
6+
37This action sets up a PostgreSQL server for the rest of the job. Here are some
48key features:
59
@@ -17,7 +21,7 @@ key features:
1721> [ !IMPORTANT]
1822>
1923> In order to connect to a PostgreSQL server, use either connection parameters
20- > from the table below ([ link] ( #connection-parameters ) ), or retrieve a
24+ > from the table below ([ link] ( #outputs ) ), or retrieve a
2125> connection URI from the ` connection-uri ` output ([ link] ( #advanced ) ).
2226
2327> [ !TIP]
@@ -27,17 +31,21 @@ key features:
2731> where ` postgres ` is the service name extracted from the ` service-name `
2832> output.
2933
30- #### Connection parameters
31-
32- | Key | Value |
33- | ----------| -----------------------------------------------------|
34- | URI | ` postgresql://postgres:postgres@localhost/postgres ` |
35- | Host | ` localhost ` |
36- | Port | ` 5432 ` |
37- | Username | ` postgres ` |
38- | Password | ` postgres ` |
39- | Database | ` postgres ` |
40- | Service | ` postgres ` |
34+ #### Action Parameters
35+
36+ | Key | Value | Default |
37+ | ------------| ------------------------------------------------------------------------------------------------------| -------------|
38+ | username | The username of the user to setup. | ` postgres ` |
39+ | password | The password of the user to setup. | ` postgres ` |
40+ | database | The database name to setup and grant permissions to created user. | ` postgres ` |
41+ | port | The server port to listen on. | ` 5432 ` |
42+
43+ #### Outputs
44+
45+ | Key | Description | Example |
46+ | ----------------| ----------------------------------------------| -----------------------------------------------------|
47+ | connection-uri | The connection URI to connect to PostgreSQL. | ` postgresql://postgres:postgres@localhost/postgres ` |
48+ | service-name | The service name with connection parameters. | ` postgres ` |
4149
4250#### User permissions
4351
0 commit comments