Skip to content
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

Bug: Example in documentation causes yaml error #17

Open
1 task done
realnc opened this issue May 12, 2022 · 1 comment
Open
1 task done

Bug: Example in documentation causes yaml error #17

realnc opened this issue May 12, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@realnc
Copy link

realnc commented May 12, 2022

Is there an existing issue for this?

  • I have searched the existing issues

Current behavior

This example shown in the documentation on how to avoid double execution does not work:

workflows:
  # This workflow is set to be conditionally triggered,
  # only via the GitHub Action.
  # With no other unfiltered workflows, normal push events will be ignored.
  when: << pipeline.parameters.GHA_Action >>
  test:
    jobs:
      - test

It causes the CircleCI pipeline to fail with:

#!/bin/sh -eo pipefail
# ERROR IN CONFIG FILE:
# [#/workflows/when] only 0 subschema matches out of 2
# 1. [#/workflows/when] expected type: Mapping, found: String
# |   SCHEMA:
# |     type: object
# |   INPUT:
# |     << pipeline.parameters.GHA_Action >>
# 2. [#/workflows/when] subject must not be valid against schema {\"description\":\"cannot use both 'when' and 'unless'\",\"allOf\":[{\"required\":[\"when\"]},{\"required\":[\"unless\"]}]}
# |   SCHEMA:
# |     not:
# |       description: cannot use both 'when' and 'unless'
# |       allOf:
# |       - required:
# |         - when
# |       - required:
# |         - unless
# |   INPUT:
# |     << pipeline.parameters.GHA_Action >>

Minimum reproduction code

https://gist.github.com/realnc/796e8302d6e546c95fd4e274b9686091

Steps to reproduce

No response

Expected behavior

when: << pipeline.parameters.GHA_Action >> should prevent the workflow from running rather than resulting in the pipeline to fail.

GitHub Action Version

1.0.4

Other

No response

@realnc realnc added the bug Something isn't working label May 12, 2022
@emdobrin
Copy link

emdobrin commented Sep 7, 2023

+1
When using the documented sample I see the pipeline fails with the following error "All Workflows have been filtered from this Pipeline. No Jobs have been run."
The problem is that this error is now translated in a PR check fail that shows with red (as shown below) even if the workflow was successfully triggered and all the CI checks passed:
Screenshot 2023-09-06 at 6 30 26 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants