Skip to content

Conversation

matt-42
Copy link
Contributor

@matt-42 matt-42 commented Feb 2, 2022

No description provided.

@ikalnytskyi
Copy link
Owner

Hey @matt-42,

Thanks for the contribution. Can you please provide some context on why it's needed? I mean, why would someone want to use a non-default PostgreSQL port on their CI? Is there some use case for that?

action.yml Outdated
@@ -60,6 +65,8 @@ runs:
shell: bash

- name: Setup PostgreSQL user and database
env:
PGPORT: ${{ inputs.port }}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This won't persist, and thus users' steps won't be able to use psql or createuser directly. We should persist it together with PGUSER and PGHOST in the step above. Can you please move it there?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm writing a database driver and I wanted to test that it also work on a non default port. That's why I added this option.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This won't persist, and thus users' steps won't be able to use psql or createuser directly. We should persist it together with PGUSER and PGHOST in the step above. Can you please move it there?

Fixed in my last commit.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm writing a database driver and I wanted to test that it also work on a non default port. That's why I added this option.

Makes sense. 👍

Fixed in my last commit.

Great! Thank you!

@ikalnytskyi ikalnytskyi merged commit 58a9f46 into ikalnytskyi:master Feb 13, 2022
@ikalnytskyi
Copy link
Owner

I just published ikalnytskyi/action-setup-postgres@v2 with this enhancement. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants