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: No file in /home/runner/work/ansible/ansible matched to [~/requirements.txt or **/pyproject.toml] #3648

Closed
0lzi opened this issue Aug 8, 2023 · 5 comments
Assignees
Labels

Comments

@0lzi
Copy link

0lzi commented Aug 8, 2023

Summary

Using the GH action with the following .yml

---
name: ansible-lint
on:
  push:
    branches:
      - '*'
  pull_request:
    branches: ["main"]
jobs:
  build:
    name: Ansible Lint
    runs-on: ubuntu-latest
    steps:
      - name: Run ansible-lint
        uses: ansible/[email protected]

I get the following Error when running

Error: No file in /home/runner/work/ansible/ansible matched to [~/requirements.txt or **/pyproject.toml], make sure you have checked out the target repository

Issue Type
  • Bug Report
OS / ENVIRONMENT

Github Actions

STEPS TO REPRODUCE

Create ansible-lint.yml in .github/workflows folder

pasted

---
name: ansible-lint
on:
  push:
    branches:
      - '*'
  pull_request:
    branches: ["main"]
jobs:
  build:
    name: Ansible Lint
    runs-on: ubuntu-latest
    steps:
      - name: Run ansible-lint
        uses: ansible/[email protected]

Push to new branch,get below error

Error: No file in /home/runner/work/ansible/ansible matched to [~/requirements.txt or **/pyproject.toml], make sure you have checked out the target repository
Desired Behavior

The action workflow runs ansible-lint on repository

Actual Behavior

Workflow fails

@0lzi 0lzi added bug new Triage required labels Aug 8, 2023
@ReenigneArcher
Copy link
Contributor

I'm getting the same error after changed from the archived action.

But I do have a requirements.txt in the root of my repo and have checked out the repo.

jobs:
  ansible_lint:
    name: ansible lint
    runs-on: [self-hosted, linux, X64]
    steps:
      - name: Checkout
        uses: actions/checkout@v3

      - name: Ansible lint
        id: ansible-lint
        uses: ansible/[email protected]
        with:
          path: "playbooks/"

@benjy44
Copy link

benjy44 commented Aug 14, 2023

I experience the same issue
Running ACT locally does not produce any issue
Running previous version v6.17.1 causes a completely different issue about × Getting requirements to build wheel did not run successfully.

@alinabuzachis
Copy link

We are also facing this issue: redhat-cop/cloud.aws_ops#84 and redhat-cop/cloud.aws_troubleshooting#24

AlexTMjugador added a commit to ComunidadAylas/terraform-aylas-servers that referenced this issue Aug 18, 2023
@AlexTMjugador
Copy link

I was affected by this and found out that this problem has already been silently addressed. The v6.17.2 tag was last modified minutes before the commit that fixes this issue was pushed: 6f728e0

Therefore, the v6.17.2 tag is known to be broken. Until a new tag with that commit is pushed, workflows should either:

  • Use ansible/ansible-lint@main, as mentioned in the README.md file.
  • Pin their ansible-lint action dependency to the aforementioned commit, like this: ansible/ansible-lint@6f728e0c95671350595c14f46fe71738adc23d2e.

@ssbarnea ssbarnea self-assigned this Aug 22, 2023
@ssbarnea ssbarnea removed the new Triage required label Aug 22, 2023
@ssbarnea
Copy link
Member

Sadly I am unable to just remove that version but I added a comment, recommending everyone to use v6.18.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants