diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 313bd5c..d07a27c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,7 +11,7 @@ jobs: - uses: actions/checkout@v1 - name: Set up Postgresql with Postgis - uses: huaxk/postgis-action@master + uses: huaxk/postgis-action@v1 with: postgresql user: 'test' postgresql password: ${{ secrets.DatabasePassword }} diff --git a/README.md b/README.md index acf47d3..d5a68e2 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,26 @@ -# postgis-action -GitHub Action to setup a PostgreSQL database with Postgis. +# PostgreSQL with Postgis GitHub Action +This [GitHub Action](https://github.com/features/actions) setup a PostgreSQL database with Postgis. + +# Usage + +Basic: +```yaml +steps: +- uses: huaxk/postgis-action@v1 + with: + postgresql version: '11' # See https://https://hub.docker.com/r/mdillon/postgis for available versions, if it is not specified, use the default value 'latest' + postgresql password: ${{ secrets.DatabasePassword }} # This environment variable sets the superuser password for PostgreSQL, maybe string or secrets, the default superuser is defined by the input environment variable: postgresql user. + postgresql user: 'test' # This optional environment variable is used in conjunction with postgresql password to set a user and its password. This variable will create the specified user with superuser power and a database with the same name. If it is not specified, then the default user of 'postgres' will be used. + postgresql db: 'test' # This optional environment variable can be used to define a different name for the default database that is created when the image is first started. If it is not specified, then the value of postgresql user will be used. +``` + +Clinet params: +* host: "localhost" +* user: "test" +* password: *** +* database: "test" +* port: 5432 + +# License + +The scripts and documentation in this project are released under the [MIT License](LICENSE)