game-ci / unity-test-runner

Run tests for any Unity project
https://github.com/marketplace/actions/unity-test-runner
MIT License
210 stars 135 forks source link

Fails when organization or repository name have uppercase letters #268

Closed DigitalEpidemic closed 5 months ago

DigitalEpidemic commented 5 months ago

Bug description

CI fails when trying to boot up docker when there are uppercase letters in the organization of the repo (I assume the same issue will happen if the repo has uppercase letters as well) with this error:

docker: invalid reference format: repository name must be lowercase.
See 'docker run --help'.
Error: The process '/usr/bin/docker' failed with exit code 125

How to reproduce

Have uppercase letters in either your repository name or organization name and try using this action in your GitHub workflow.

Example: I have an organization of TEST and a repository of my-repository. GitHub stores it like so in an environment variable GITHUB_REPOSITORY=TEST/my-repository. This causes CI to fail due to the repository name not being lowercase.

Casing of the organization or repository name should not matter and the docker container should boot up properly.

Additional details

Removed some sensitive info, but this is the whole GitHub job output log:

/usr/bin/docker run
--workdir /github/workspace
--cidfile /home/runner/work/_temp/container___game-ci_unity-test-runner --rm
--env UNITY_EMAIL=*** --env UNITY_PASSWORD=*** --env UNITY_SERIAL=*** --env UNITY_VERSION=2019.4.17f1
--env PROJECT_PATH=. --env COVERAGE_OPTIONS=generateAdditionalMetrics;generateAdditionalReports;
--env COVERAGE_RESULTS_PATH=CodeCoverage --env ARTIFACTS_PATH=artifacts
--env PACKAGE_MODE=false --env CUSTOM_PARAMETERS=-enableCodeCoverage --env RUN_AS_HOST_USER=false
--env GITHUB_REF=refs/pull/690/merge --env GITHUB_SHA=***
--env GITHUB_REPOSITORY=TEST/my-repository --env GITHUB_ACTOR=DigitalEpidemic --env GITHUB_WORKFLOW=Run Tests
--env GITHUB_HEAD_REF=feature/code-coverage --env GITHUB_BASE_REF=staging
--env GITHUB_EVENT_NAME=pull_request --env GITHUB_ACTION=__game-ci_unity-test-runner
--env GITHUB_EVENT_PATH=/home/runner/work/_temp/_github_workflow/event.json --env RUNNER_OS=Linux
--env RUNNER_TOOL_CACHE=/opt/hostedtoolcache --env RUNNER_TEMP=/home/runner/work/_temp
--env RUNNER_WORKSPACE=/home/runner/work/my-repository
--env GIT_CONFIG_EXTENSIONS
--env TEST_PLATFORMS=playmode
--env GITHUB_WORKSPACE=/github/workspace --volume /home/runner/work/_temp/_github_home:/root:z
--volume /home/runner/work/_temp/_github_workflow:/github/workflow:z
--volume /home/runner/work/my-repository/my-repository:/github/workspace:z
--volume /home/runner/work/_actions/game-ci/unity-test-runner/v4/dist/test-standalone-scripts:/UnityStandaloneScripts:z
--volume /home/runner/work/_actions/game-ci/unity-test-runner/v4/dist/platforms/ubuntu:/steps:z
--volume /home/runner/work/_actions/game-ci/unity-test-runner/v4/dist/unity-config:/usr/share/unity3d/config/:z
--volume /home/runner/work/_actions/game-ci/unity-test-runner/v4/dist/BlankProject:/BlankProject:z
--cpus=2  --memory=7533m --env USE_EXIT_CODE=true
unityci/editor:ubuntu-2019.4.17f1-linux-il2cpp-3 /bin/bash -c /steps/entrypoint.sh

docker: invalid reference format: repository name must be lowercase.
See 'docker run --help'.
Error: The process '/usr/bin/docker' failed with exit code 125
DigitalEpidemic commented 5 months ago

Closing due to issue being something different.

The error was due to my GitHub password having a specific special character that it broke the docker command.