ansible / ansible-lint-action

❗️Replaced by https://github.com/marketplace/actions/run-ansible-lint
https://github.com/marketplace/actions/run-ansible-lint
MIT License
254 stars 132 forks source link

Warning on every run #147

Closed BillWeiss closed 1 year ago

BillWeiss commented 1 year ago

Maybe it's just me, unsure :) I have this segment of a workflow file:

  ---
  name: CI

  # Controls when the workflow will run
--on:
    push:
      branches: ["main"]
    pull_request:
      branches: ["main"]

    # Allows you to run this workflow manually from the Actions tab
    workflow_dispatch:

  jobs:
    linters:
      runs-on: ubuntu-latest
      steps:
        - uses: actions/checkout@v3

        - name: Run ansible-lint
          uses: ansible/ansible-lint-action@v6

And I have this .ansible-lint file in the root of the repo:

---
skip_list:
  - no-handler
warn_list:
  - experimental

On each run, I see this in the output:

WARNING  Failed to discover lintable files using git: fatal: detected dubious ownership in repository at '/github/workspace'
To add an exception for this directory, call:

    git config --global --add safe.directory /github/workspace
WARNING  Failed to discover lintable files using git: fatal: detected dubious ownership in repository at '/github/workspace'
To add an exception for this directory, call:

    git config --global --add safe.directory /github/workspace

It's working despite that warning, so, not high priority, but it's an odd warning from inside a github action. Any thoughts?

This is somewhat of a monorepo, so the ansible code is all in a subdirectory ansible/ . Any thoughts?

ssbarnea commented 1 year ago

git: fatal: detected dubious ownership in repository at '/github/workspace' comes from git and has nothing to do with us, so I will close the bug. Still, once you find the solution feel free to add a link to it. To me this looks like a GHA specific issue, so https://github.com/community/community/discussions may prove to be a good starting point.