Closed ozanozbeker closed 2 weeks ago
Could you provide?
What you shared is unfortunately not enough especially because it has no syntax errors, see https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-including-branches-and-tags. So the error you are talking about is for another part of your GitHub Action YAML.
@ozanozbeker Thanks a lot for the feedback. All our doc uses this syntax, which does not seem to be valid (anymore?) Doc page example: https://quarto.org/docs/publishing/netlify.html#publish-action
It should be
on:
workflow_dispatch:
push:
branches:
- main
or
on:
workflow_dispatch:
push:
branches: [main]
we'll update
Just to clarify: The syntax used in the example does trigger linting error in VSCODE when using Actions extension
Though it is valid syntax as our own workflow is using it
and this CI is running ok.
To not trigger this linting schema error on our example, I'll update the doc using expected syntax.
What is giving you the linter error? The GitHub Actions extension is happy.
To me the issue is somewhere else. Somewhere that wrongly enforces a restricted version of the GitHub Actions schema. Changing the documentation is not a proper fix as an error/warning should not even exist here.
What is giving you the linter error? The GitHub Actions extension is happy.
Not github action then 🤷 - I got this in my VSCODE.
Github Workflow extension ? 🤔
Somewhere that wrongly enforces a restricted version of the GitHub Actions schema.
Possibly. Don't know where the updated schema lives.
Changing the documentation is not a proper fix as an error/warning should not even exist here.
yes agree. Though using any form is ok, and using [ ]
or -
is usually the best syntax, as it allows to easily add new branches to the trigger. So even is not a "proper fix", it culd be seen as valid update.
yes agree. Though using any form is ok, and using [ ] or - is usually the best syntax, as it allows to easily add new branches to the trigger. So even is not a "proper fix", it culd be seen as valid update.
I was not saying, don't do this.
But we need to identify more clearly what is blocking here as some users might use the "branches: main" syntax and get no warnings or else from GitHub itself.
Github Workflow extension ? 🤔
It is about schema validation in VSCODE it seems
I can change it by clicking on it
which triggers other linting error 😅
Correctly using Github Action workflow as the file type (and not YAML) shows no error.
Good to know ! Thanks for pointing that out
@ozanozbeker we round trip to the source of the problem.
the .github/workflows/publish.yml gives the Problem: Incorrect type. Expected "array".
Where did you get this error ?
Using the documentation to publish on Netlify via GitHub Actions, the .github/workflows/publish.yml gives the Problem: Incorrect type. Expected "array". when using:
FYI, I added the needs-repro because we don't know from where the "error" comes from.
Ok I added it back
Thank you for using Quarto and reporting an issue!
Unfortunately, this issue is now considered stale because it has been opened since 14 days without providing a "working" reproducible example to help us investigate. If you are still facing the issue, please review the "Bug Reports" guide on how to provide a fully reproducible example as a self-contained Quarto document or a link to a Git repository. Without a reproducible example, it is unlikely that the issue will be addressed.
You can share a Quarto document using the following syntax, i.e., using more backticks than you have in your document (usually four ````
).
````qmd
---
title: "Reproducible Quarto Document"
format: html
---
This is a reproducible Quarto document using `format: html`.
It is written in Markdown and contains embedded R code.
When you run the code, it will produce a plot.
```{r}
plot(cars)
The end.
@ozanozbeker do you have more details to share ?
I'm going to go ahead and close this one. If the original reporter can provide more information, please feel free to reopen.
What would you like to do?
Report an issue on quarto.org
Description
Using the documentation to publish on Netlify via GitHub Actions, the .github/workflows/publish.yml gives the Problem:
Incorrect type. Expected "array".
when using:I believe it's supposed to be: