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

Path is empty when not provided #156

Closed
alexandear opened this issue Jan 22, 2025 · 1 comment · Fixed by #159
Closed

Path is empty when not provided #156

alexandear opened this issue Jan 22, 2025 · 1 comment · Fixed by #159

Comments

@alexandear
Copy link

The configuration option "Path pattern" is empty when not provided. But it should be "./..." according to the description and code.

The following configuration

- uses: morphy2k/revive-action@v2

is the same as:

- uses: morphy2k/revive-action@v2
  with:
    path: ""

But should be:

- uses: morphy2k/revive-action@v2
  with:
    path: "./..."

I found it when using this GitHub Actions configuration:

jobs:

  lint:
    name: Lint
    runs-on: ubuntu-latest
    steps:

    - name: Check out code into the Go module directory
      uses: actions/checkout@v4
    - name: Run Revive Action
      uses: morphy2k/revive-action@v2
      with:
        config: revive.toml

When running on GitHub, INPUT_PATH is passed (and empty):

Run morphy2k/revive-action@v2
  with:
    config: revive.toml
/usr/bin/docker run --name c81f173041[2](https://github.com/mgechev/revive/actions/runs/12912549533/job/36007638745#step:4:2)7922a8d47059d[3](https://github.com/mgechev/revive/actions/runs/12912549533/job/36007638745#step:4:3)b39b355b29932_5ee089 --label c81f17 --workdir /github/workspace --rm -e "INPUT_CONFIG" -e "INPUT_EXCLUDE" -e "INPUT_PATH" -e "INPUT_FAIL-ON-ANY" -e "HOME" -e "GITHUB_JOB" -e "GITHUB_REF" -e "GITHUB_SHA" -e "GITHUB_REPOSITORY" -e "GITHUB_REPOSITORY_OWNER" -e "GITHUB_REPOSITORY_OWNER_ID" -e "GITHUB_RUN_ID" -e "GITHUB_RUN_NUMBER" -e "GITHUB_RETENTION_DAYS" -e "GITHUB_RUN_ATTEMPT" -e "GITHUB_REPOSITORY_ID" -e "GITHUB_ACTOR_ID" -e "GITHUB_ACTOR" -e "GITHUB_TRIGGERING_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_REF_NAME" -e "GITHUB_REF_PROTECTED" -e "GITHUB_REF_TYPE" -e "GITHUB_WORKFLOW_REF" -e "GITHUB_WORKFLOW_SHA" -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 "GITHUB_STEP_SUMMARY" -e "GITHUB_STATE" -e "GITHUB_OUTPUT" -e "RUNNER_OS" -e "RUNNER_ARCH" -e "RUNNER_NAME" -e "RUNNER_ENVIRONMENT" -e "RUNNER_TOOL_CACHE" -e "RUNNER_TEMP" -e "RUNNER_WORKSPACE" -e "ACTIONS_RUNTIME_URL" -e "ACTIONS_RUNTIME_TOKEN" -e "ACTIONS_CACHE_URL" -e "ACTIONS_RESULTS_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/revive/revive":"/github/workspace" c81f17:30[4](https://github.com/mgechev/revive/actions/runs/12912549533/job/36007638745#step:4:5)127922a8d47059d3b39b355b29932
ACTION: 
REVIVE: 1.5.1
Failures
Successful run with 0 failures (0 warnings, 0 errors)
@morphy2k
Copy link
Owner

This issue only seems to occur if the Git repository is specified directly instead of the pre-built Docker image.

In the first case, the environment variable is set even if the input is not used. See here and here

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

Successfully merging a pull request may close this issue.

2 participants