Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0
- run: git push origin HEAD:v1
14 changes: 13 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,22 @@ jobs:
name: ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- run: psql --version
- uses: ./
- run: pg_isready --dbname=$POSTGRES_URL
- run: psql --command='CREATE TABLE tbl()' $POSTGRES_URL
- run: psql --command='\d' $POSTGRES_URL
- run: psql --command='SELECT * FROM pg_available_extensions' $POSTGRES_URL
test_custom_env:
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./
with:
env-key: DATABASE_URL
- run: pg_isready --dbname=$DATABASE_URL
- run: psql --command='CREATE TABLE tbl()' $DATABASE_URL
- run: psql --command='\d' $DATABASE_URL
- run: psql --command='SELECT * FROM pg_available_extensions' $DATABASE_URL
7 changes: 6 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ description: "Start PostgreSQL in the GitHub Actions VM"
branding:
icon: "save"
color: "orange"
inputs:
env-key:
description: "Name of the environment variable with the Postgres URL"
required: false
default: "POSTGRES_URL"
runs:
using: "composite"
steps:
Expand All @@ -18,5 +23,5 @@ runs:
- run: createdb ${USER}
shell: bash

- run: echo "POSTGRES_URL=postgres://localhost/${USER}" >> $GITHUB_ENV
- run: echo "${{ inputs.env-key }}=postgres://localhost/${USER}" >> $GITHUB_ENV
shell: bash