Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/dentarg/postgres

Start PostgreSQL in the GitHub Actions VM
https://github.com/dentarg/postgres

actions database github-actions postgresql

Last synced: about 1 month ago
JSON representation

Start PostgreSQL in the GitHub Actions VM

Awesome Lists containing this project

README

        

# postgres

`dentarg/postgres` is an [composite run steps action] that starts PostgreSQL in the GitHub Actions VM and creates a user and a database. You can then connect to the database using the address found in environment variable `POSTGRES_URL`.

```yaml
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: dentarg/postgres@v1
- run:
env:
DATABASE_URL: "${{ env.POSTGRES_URL }}" # or use POSTGRES_URL directly
```

[composite run steps action]: https://docs.github.com/en/free-pro-team@latest/actions/creating-actions/creating-a-composite-run-steps-action

See the [GitHub Actions Virtual Environments](https://github.com/actions/virtual-environments/#available-environments) repo to understand what version of PostgreSQL will be used.