Skip to content

.github/workflow files are ignored by default #66

Open

Description

@Snailedlt

At the moment my workflow file is being ignored:
image

This shouldn't happen because GitHub still says No newline at end of file for that file, so it makes no sense to ignore it by default.
image

Activity

  1. Logerfo commented on Jan 11, 2023

    @Logerfo
    Owner

    Interesting... I'd say this is a bug. There's no specified behavior for skipping other than the assigned paths to ignore. If no assignment is made, the default configuration ignores bin/**, node_modules/** and out/**, none of which should ignore any workflow file. I don't know if the actual behavior is related to the fact that the skipped file is the running workflow file itself.

  2. Snailedlt commented on Jan 11, 2023

    @Snailedlt
    Author

    Hmm, I first thought it might be a permission problem, but then the is ignored message seems weird, cause that only happens if the if statement above it is true.

    Definitely a bug I'd say. I'm soon updating another workflow file, so I'll let you know how that goes :)

  3. Logerfo commented on Jan 11, 2023

    @Logerfo
    Owner

    @Snailedlt is it possible that your token has no read permission for the workflow file, but has for some other files? I don't know if that depth of granularity is supported, but perhaps you'd know if you use it.

  4. Snailedlt commented on Jan 11, 2023

    @Snailedlt
    Author

    I don't think that could even be the cause of the issue, could it?

    As far as I can tell that wouldn't affect this if statement, which is what is ran to return that message you see in the first image in the issue description.

    newline-action/src/main.js

    Lines 114 to 117 in d5cb021

    if (!paths.includes(`${REPO_DIRECTORY}/${element.filename}`)) {
    core.info(`${element.filename} is ignored. Skipping...`);
    continue;
    }

  5. Logerfo commented on Jan 11, 2023

    @Logerfo
    Owner

    @Snailedlt if the blob object is unaware of the existence of the workflow file, I think that might cause the problem you stumbled upon.

  6. Snailedlt commented on Jan 11, 2023

    @Snailedlt
    Author

    I confirmed that it's at least inside .github and .github/workflow folders. Could be permission like you say, any idea how to fix it?
    image

  7. changed the title [-]Don't ignore .github/workflow files[/-] [+].github/workflow files are being ignored by default[/+] on Jan 11, 2023
  8. changed the title [-].github/workflow files are being ignored by default[/-] [+].github/workflow files are ignored by default[/+] on Jan 11, 2023
  9. Logerfo commented on Jan 11, 2023

    @Logerfo
    Owner

    @Snailedlt can you confirm that the action is successfully reading files located in directories other than root?

  10. Snailedlt commented on Jan 12, 2023

    @Snailedlt
    Author

    Not at the moment because we have to focus on other issues. But once I get around to doing it, I'll let you know :)

  11. Snailedlt commented on Jan 16, 2023

    @Snailedlt
    Author

    @Logerfo
    image

    So I guess I need to use a different github token then

  12. Logerfo commented on Jan 16, 2023

    @Logerfo
    Owner

    @Snailedlt I was wondering if the implemented blob was wrong, maybe only reading the root folder, but it's working fine for me: https://github.com/Logerfo/newline-test/actions/runs/3932390852/jobs/6724891213. Maybe it really is something related to permissions, specially if your repo is in an organization, but I don't know much about GitHub's granularity.

  13. Snailedlt commented on Jan 16, 2023

    @Snailedlt
    Author

    Yes, that's beginning to look more and more likely. The project is in a private repo in an organization

  14. pablogamboa commented on Feb 27, 2023

    @pablogamboa

    I'm getting the same issue, the project is a private repo in an organization and it skips the files

  15. connorjchen commented on Apr 19, 2023

    @connorjchen

    I am getting same issue as well - project is also in private repo in an organization and it is ignored

    My files that are being ignored are .github/** as well as .gitignore and .dockerfile in any directory

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions