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

Failed to match codes between repo and fixes.yml. #23

Closed
caic99 opened this issue Apr 19, 2022 · 3 comments · Fixed by #25
Closed

Failed to match codes between repo and fixes.yml. #23

caic99 opened this issue Apr 19, 2022 · 3 comments · Fixed by #25

Comments

@caic99
Copy link
Contributor

caic99 commented Apr 19, 2022

In my action, the running log shows that "No warnings found in files changed in this pull request". This error also happened in #17 .

@kenji-miyake All file paths in your fixes.yaml begin with /__w/... (probably because clang-tidy is running self-hosted) while this action expects the GitHub directory layout (/home/runner/...), so it can't normalize paths and is not able to find all these files from your PR.
Originally posted by @oleg-derevenetz in #17 (comment)

Thanks @oleg-derevenetz points out that there is another file system in a custom actions container.

I wonder is there a proper way to avoid modifications on fixes.yaml? Maybe GitHub environment variable GITHUB_WORKSPACE helps, creating a symlink from from /home/runner/... to /__w/... .

@caic99
Copy link
Contributor Author

caic99 commented Apr 19, 2022

This might because the job is run in a container, and the working directory defaults to /__w/ in it. ref

@caic99
Copy link
Contributor Author

caic99 commented Apr 19, 2022

Actions that run in Docker containers have static directories under the /github path. ref

If you have steps that use both script and container actions, the container actions will run as sibling containers on the same network with the same volume mounts. ref

What confuses me is the file system and mapping strategy among these two containers and the host system. After all, the fixes.yml is read normally.

@caic99
Copy link
Contributor Author

caic99 commented Apr 19, 2022

@caic99 Yeah, just like I suspected, it seems that the GITHUB_WORKSPACE variable points to the different directory inside a custom action container:
https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#file-systems

Originally posted by @oleg-derevenetz in #17 (comment)

A tested workaround goes here.

caic99 added a commit to caic99/clang-tidy-pr-comments that referenced this issue Apr 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant