mirror of
https://github.com/nektos/act.git
synced 2026-04-26 01:15:51 +03:00
[PR #2272] [MERGED] Fix for issue 2232: Many lines of "Could not find any stages to run" on run #2362
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#2362
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?
📋 Pull Request Information
Original PR: https://github.com/nektos/act/pull/2272
Author: @Andy4495
Created: 4/4/2024
Status: ✅ Merged
Merged: 5/13/2024
Merged by: @mergify[bot]
Base:
master← Head:fix_for_issue_2232📝 Commits (10+)
ee5da82Initial commit81057bbMerge branch 'master' into fix_for_issue_22321524929Merge branch 'nektos:master' into fix_for_issue_2232a1ff36aPut the tests back9d7cdd8Remove unnecessary checksac4c99cRemove unneeded check and fix test code70ba451Merge branch 'master' into fix_for_issue_2232cefb9c9Merge branch 'master' into fix_for_issue_2232e2a2b26Merge branch 'master' into fix_for_issue_22321e3e842Merge branch 'master' into fix_for_issue_2232📊 Changes
3 files changed (+7 additions, -11 deletions)
View changed files
📝
cmd/root.go(+5 -0)📝
pkg/model/planner.go(+0 -4)📝
pkg/model/planner_test.go(+2 -7)📄 Description
Fixes #2232: Many lines of "Could not find any stages to run" on run
Fixes #1993: Unexpected failure due to warning "Could not find any stages to run"
Issues #2232 and #1993 were introduced with pull request #1970.
The Problem
#1970 prints a lot of messages even when there isn’t a problem, since the check is called twice for each workflow file in the workflows directory:
In addition, it prints an error message at the end of the run, even if the job was run successfully:
This also has the side effect of causing act to return an error code (1), even if the run was successful:
The Fix
This pull request fixes these issues by making the following changes:
root.goThis solves both problems mentioned above:
With this fix, the output is as follows. Note the error code returned in both cases:
Normal run, including return code of 0:
Failed run because no valid jobs were found, including return code of 1:
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.