[
  {
    "path": "Dockerfile",
    "content": "FROM docker:stable\n\nCOPY entrypoint.sh /entrypoint.sh\nRUN chmod +x /entrypoint.sh\nENTRYPOINT [\"/entrypoint.sh\"]\n"
  },
  {
    "path": "LICENSE",
    "content": "MIT License\n\nCopyright (c) 2019 Harmon\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
  },
  {
    "path": "README.md",
    "content": "# PostgreSQL GitHub Action\n\nThis [GitHub Action](https://github.com/features/actions) sets up a PostgreSQL database.\n\n# Usage\n\nSee [action.yml](action.yml)\n\nBasic:\n```yaml\nsteps:\n- uses: harmon758/postgresql-action@v1\n  with:\n    postgresql version: '11'  # See https://hub.docker.com/_/postgres for available versions\n```\n\n# License\n\nThe scripts and documentation in this project are released under the [MIT License](LICENSE)\n"
  },
  {
    "path": "action.yml",
    "content": "name: 'Setup PostgreSQL'\ndescription: 'Setup a PostgreSQL database'\nauthor: 'Harmon'\nbranding:\n  icon: 'database'\n  color: 'blue'\ninputs:\n  # See https://hub.docker.com/_/postgres for supported versions\n  # and further details on input environment variables\n  postgresql version:\n    description: 'Version of PostgreSQL to use'\n    required: false\n    default: 'latest'\n  postgresql db:\n    description: 'POSTGRES_DB - name for the default database that is created'\n    required: false\n    default: ''\n  postgresql user:\n    description: 'POSTGRES_USER - create the specified user with superuser power'\n    required: false\n    default: ''\n  postgresql password:\n    description: 'POSTGRES_PASSWORD - superuser password'\n    required: false\n    default: ''\nruns:\n  using: 'docker'\n  image: 'Dockerfile'\n"
  },
  {
    "path": "entrypoint.sh",
    "content": "#!/bin/sh\n\ndocker_run=\"docker run\"\ndocker_run=\"$docker_run -e POSTGRES_DB=$INPUT_POSTGRESQL_DB\"\ndocker_run=\"$docker_run -e POSTGRES_USER=$INPUT_POSTGRESQL_USER\"\ndocker_run=\"$docker_run -e POSTGRES_PASSWORD=$INPUT_POSTGRESQL_PASSWORD\"\ndocker_run=\"$docker_run -d -p 5432:5432 postgres:$INPUT_POSTGRESQL_VERSION\"\n\nsh -c \"$docker_run\"\n"
  }
]