Harmon758 / postgresql-action

GitHub Action to setup a PostgreSQL database
MIT License
126 stars 40 forks source link

Invalid reference format #8

Open kblicharski opened 4 years ago

kblicharski commented 4 years ago

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

The error:

Run Harmon758/postgresql-action@v1.0.0
/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/postgresql-action@v1.0.0
      with:
        postgresql version: postgres:10.1-alpine
        postgresql db: db
        postgresql user: postgres
        postgresql password: postgres

Any help would be appreciated.

jbpratt commented 4 years ago

Hi @kblicharski, I believe the issue here is with your postgresql version variable. From what I have seen, it should simply be the version number for the container you want. In this case, dropping the postgres hopefully fixes your problem.

https://hub.docker.com/_/postgres

tomasnorre commented 3 years ago

I think it's because of the space in variable name: postgresql version, but not sure.

The docs says it should be like that. But looks odd to me.