job.<job_id>.if
is ignored when using reusable workflow #31
Loading…
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?
When using a conditional job that utilizes a reusable workflow,
job.<job_id>.if
is completely ignored.The workflow
test.yaml
has two jobs with same condition, but only the jobtest
is skipped, the jobtest-reusable
which is using a reusable workflow is executed.Workflow content
reusable.yaml
test.yaml
Relevant log output
For the job
test
For the job
test-reusable
Additional information
Here is the relevant issue in the nektos/act GitHub repository, which has been fixed with the commit 5547789, and the fix was released with the version 0.2.54.
As a workaround I added an input
run
to the reusable workflow where it is used as a condition (inputs.run == 'true'
) for all jobs.It is unclear to me how reusable workflows are supported by the ACT at the moment. They are not yet supported by the Forgejo runner and it is unfortunate that they do not fail instead of trying to run. How did you run the workflow above?
This workflow was initially tested directly in repository's actions, but the same behaviour can be observed also with
forgejo-runner exec
.