Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: "docker: invalid reference format" #3

Closed
francislavoie opened this issue Dec 22, 2020 · 4 comments
Closed

Error: "docker: invalid reference format" #3

francislavoie opened this issue Dec 22, 2020 · 4 comments

Comments

@francislavoie
Copy link

See https://github.com/Vectorface/cache/pull/8/checks?check_run_id=1592485519

/usr/bin/docker run --name cc4956c4ab57414d304381943ac46fbbdd502f_656d49 --label cc4956 --workdir /github/workspace --rm -e INPUT_REDIS-VERSION -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RETENTION_DAYS -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_SERVER_URL -e GITHUB_API_URL -e GITHUB_GRAPHQL_URL -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e GITHUB_ACTION_REPOSITORY -e GITHUB_ACTION_REF -e GITHUB_PATH -e GITHUB_ENV -e RUNNER_OS -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e ACTIONS_CACHE_URL -e GITHUB_ACTIONS=true -e CI=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/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/cache/cache":"/github/workspace" cc4956:c4ab57414d304381943ac46fbbdd502f  ""
docker: invalid reference format.

Any thoughts? 🤔

@marcuspoehls
Copy link
Member

marcuspoehls commented Dec 22, 2020

@francislavoie Hey Francis, I think you’re not defining a Redis version in your GitHub Actions workflow file.

Here’s a sample config using Redis 4, 5, and 6:

name: Run tests

on: [push]

jobs:
  build:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        redis-version: [4, 5, 6]

@francislavoie
Copy link
Author

I did actually Vectorface/cache@7f6a103 but oops, just noticed I made a typo with plural s 😬 my bad!

@francislavoie
Copy link
Author

That said, the error could probably be more useful. Maybe this action should validate that the version number looks reasonable (non-empty etc) before trying to run Docker? Would have saved me from this confusion 😅

@marcuspoehls
Copy link
Member

@francislavoie Yeah definitely, the action should validate the input before starting the Docker container. Would avoid frustration and confusion in case of issues. Thank you for making it obvious 👍

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

No branches or pull requests

2 participants