mirror of
https://github.com/nektos/act.git
synced 2026-04-27 01:45:52 +03:00
[GH-ISSUE #2487] Yaml files other than valid workflow files are considered invalid workflow files #1147
Labels
No labels
area/action
area/cli
area/docs
area/image
area/runner
area/workflow
backlog
confirmed/not-planned
kind/bug
kind/discussion
kind/external
kind/feature-request
kind/question
meta/duplicate
meta/invalid
meta/need-more-info
meta/resolved
meta/wontfix
meta/workaround
needs-work
pull-request
review/not-planned
size/M
size/XL
size/XXL
stale
stale-exempt
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/act#1147
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @johannesmarx on GitHub (Oct 16, 2024).
Original GitHub issue: https://github.com/nektos/act/issues/2487
Bug report info
Command used with act
Describe issue
I'm currently having configuration files in
.github/workflowthat are Yaml files but are not any workflow files.These configuration files e.g.
.github/workflow/myconfig.ymlare used by applications I invoke in my Github workflows but are not any workflow files.Thanks a lot in advance
Link to GitHub repository
No response
Workflow content
Relevant log output
Additional information
No response
@ChristopherHX commented on GitHub (Oct 16, 2024):
Act never had such a feature and is only mentioned as a small comment in your issue
Please discuss this in https://github.com/nektos/act/issues/2414, e.g. feature removal of workflow schema validation needs good reasons.
If your config is not a yaml file or a file in a subfolder I agree about a defect
The
-Wcli switch also support the path to a valid workflow, I don't think run everything is good practice@johannesmarx commented on GitHub (Oct 21, 2024):
Hi @ChristopherHX, thanks for your response. Maybe I didn't manage to describe the error well enough (also happy to change the title and/or add some more content in the description).
I'm using the following layout:
In this scenario,
script-a.config.ymlis a config file used byscript-a.sh.script-a.shis called fromworkflow-a.yml.The existence of
script-a.config.ymlleads to a failure ofact -lwith error:Error: workflow is not valid. 'script-a.config.yml': Line: 1 Column 1: Unknown Property testactseems to handlescript-a.config.ymlas a workflow file which it isn't. It's just a YAML file.From my understanding and testing using
-Wdoesn't make any difference as it still is the default./.github/workflows/in the layout shown above.@ChristopherHX commented on GitHub (Oct 21, 2024):
Ahm,
-W ./.github/workflows/workflow-a.ymlYour initial issue read like .github/workflows/script-a.config.yml, therefore I never suggested
--no-recurseto disable a still non existing Actions featureThe
--no-recursebehavior should be the default, but .... who knows in < 1/4 year you may see this issue on GitHub.com they announced implementing it@johannesmarx commented on GitHub (Oct 22, 2024):
Thanks a lot!
Both suggestions work:
-W: I didn't really got that you also could path a workflow file instead of a directory (was focusing to much on the default which is a directory) 👍act --no-recurse -l: is also working 👍