Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/dentarg/postgres
- Owner: dentarg
- Created: 2020-09-29T20:19:52.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2023-11-03T18:04:43.000Z (about 1 year ago)
- Last Synced: 2024-09-11T14:45:01.958Z (2 months ago)
- Topics: actions, database, github-actions, postgresql
- Homepage:
- Size: 20.5 KB
- Stars: 0
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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.