This message was deleted.
# gitops
s
This message was deleted.
w
I have found a few threads about this https://github.com/actions/runner/issues/491 https://github.com/orgs/community/discussions/26303 but the workarounds come with their own flaws
t
w
Thanks @Tomas Dabašinskas That is misbehaving inexplicably. Sometimes it works and sometimes doesn't, I can't tell. The documentation is also divergent. There it tells to use the syntax
if: ${{ success() }}
but on the same page, it tells to not use `${{ }}`on if conditions because it will convert the result to a string and strings are truthy.
OK this seems to work and I could add an extra conditional to enable only wanted workflows on a global run:
Copy code
jobs:
  check:
  if: contains(inputs.workflows, 'check')
    ...
  build:
  if: ${{ !cancelled() && needs.check.result != 'failure' && contains(inputs.workflows, 'build') }}
    needs: check
    ...
  test:
  if: ${{ !cancelled() && needs.build.result != 'failure' && contains(inputs.workflows, 'test') }}
    needs: build
    ...
So I can call this with:
Copy code
with:
  workflows: "build test"
And this will skip
check
, and run only
build
and
test