Giter Club home page Giter Club logo

postgresql-action's Introduction

PostgreSQL GitHub Action

This GitHub Action sets up a PostgreSQL database.

Usage

See action.yml

Basic:

steps:
- uses: harmon758/postgresql-action@v1
  with:
    postgresql version: '11'  # See https://hub.docker.com/_/postgres for available versions

License

The scripts and documentation in this project are released under the MIT License

postgresql-action's People

Contributors

harmon758 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

postgresql-action's Issues

Invalid reference format

This could entirely be user-error, but I'm not sure where I'm going wrong.

The error:

Run Harmon758/[email protected]
/usr/bin/docker run --name e87b52c65b2929f5644ec097339a1066ddedd0_d18a2d --label e87b52 --workdir /github/workspace --rm -e MOCK_TRIAL_SECRET -e DJANGO_SETTINGS_MODULE -e working-directory -e pythonLocation -e INPUT_POSTGRESQL_VERSION -e INPUT_POSTGRESQL_DB -e INPUT_POSTGRESQL_USER -e INPUT_POSTGRESQL_PASSWORD -e HOME -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e RUNNER_OS -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e GITHUB_ACTIONS=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/SEP201/SEP201":"/github/workspace" e87b52:c65b2929f5644ec097339a1066ddedd0

docker: invalid reference format.

See 'docker run --help'.

The section in my workflow file:

- name: Setup PostgreSQL
      uses: Harmon758/[email protected]
      with:
        postgresql version: postgres:10.1-alpine
        postgresql db: db
        postgresql user: postgres
        postgresql password: postgres

Any help would be appreciated.

Howto connect

Hi, I was just wondering what hostname should I use to connect postgresql db in github envirnoment?

Maven Spring Boot connection?

Github action for maven spring boot fails on "Build with maven" with error:

org.postgresql.util.PSQLException: Connection to localhost:5432 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.

My application.properties regarding the connection are:
spring.datasource.url=jdbc:postgresql://localhost:5432/postgres spring.datasource.driverClassName=org.postgresql.Driver spring.datasource.username=postgres spring.datasource.password=admin

My maven.yml:

steps: - uses: actions/checkout@v1 - name: Set up JDK 1.8 uses: actions/setup-java@v1 with: java-version: 1.8 - name: Build with Maven run: mvn -B package --file pom.xml - name: Setup PostgreSQL uses: Harmon758/[email protected] with: postgresql db: postgres postgresql user: postgres postgresql password: admin

Everything works correctly when ran locally of course.

Wait until server is fully started

I had some trouble connecting to the database immediately after this action. This resulted in a "connection reset by peer" error. Adding a sleep action between the actions solved it. However, it would be better if the postgresql action could wait the appropriate amount of time itself by pinging itself or something similar.

I think this would also solve #6 but I'm not sure so therefor this separate issue.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.