-
Notifications
You must be signed in to change notification settings - Fork 15
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
Annotations file not found by the action #55
Comments
Might be the reason as we do not use this variable: Line 123 in 79c9f5e
|
Having said that, I expect GitHub Action to execute the annotations-action in the Did you try to explicitly set the |
Thanks! I just fixed it by including my working directory in the input path. |
For some reason this action is not run in the working directory or there's some other reason why the working-directory is not applied to it |
It sounds like a bug/limitation of GitHub Actions. In my opinion, actions should not have to explicitly set the working directory, so the code seems correct: - name: Annotate SQL linting errors
uses: yuzutech/[email protected]
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
title: lint
input: './annotations.json'
working-directory: 'some/path' You should open a support ticket at: https://support.github.com/features/actions |
It looks like jobs with |
I think that it also doesn't take into account that annotations paths can be nested relative to working directory as well. Consider following workflow name: example_app
on:
pull_request:
paths:
- ".github/workflows/example_app.yaml"
- "example/lib/**"
jobs:
build:
defaults:
run:
working-directory: ./example
runs-on: ubuntu-latest
steps:
- name: 📚 Git Checkout
uses: actions/checkout@v3
...
- name: 🧪 Evaluate
run: generate_annotations > ./annotations.json
- name: 🕵️ Debug
run: cat ./annotations.json
- name: Annotate
uses: yuzutech/[email protected]
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
title: "lint"
ignore-missing-file: false
input: "./example/annotations.json"
The output can be: [
{
"path": "lib/main_development.dart",
"start_line": 9,
"end_line": 9,
"annotation_level": "notice",
"message": "My message"
}
] So the real path would be I wonder what is valid and what would be expected by users:
|
I think that's the safer approach.
Not sure if the GitHub Action has access to the |
I'm getting a
Ignoring missing file at 'annotations.json' because 'ignore-missing-file' is true
error in my workflow:The "Print annotations" step is printing out the annotations but the "Annotate SQL linting errors" step does not find the file. What am I missing here? I have configured the
working-directory
at the workflow level if that's of any importance here.The text was updated successfully, but these errors were encountered: