The action added by #13 did only properly work with workflow_dispatch but failed with push and pull_request events.
The reason for this was that github.event.inputs.pyglotaran_examples_branch was only set on workflow_dispatch and other events didn't use its default.
This is why
and git did throw an error because there wasn't a repo to clone provided.
Now the action checks that either inputs.examples_branch is provided or that a folder pyglotaran-examples exists.
If none of those conditions are met it raises an error explaining whats needs to be done.
The workflow now clones pyglotaran-examples if it is run on push or pull_request, that way pushes and PRs will use the correct commits instead of cloning code already on glotaran/pyglotaran-examples.
The CI will fail on this PR since it uses the action on main which still has the bug.
Examples of the 3 different trigger events can be found here:
The action added by #13 did only properly work with
workflow_dispatch
but failed withpush
andpull_request
events. The reason for this was thatgithub.event.inputs.pyglotaran_examples_branch
was only set onworkflow_dispatch
and other events didn't use its default. This is whyevaluated to
and git did throw an error because there wasn't a repo to clone provided.
Now the action checks that either
inputs.examples_branch
is provided or that a folderpyglotaran-examples
exists. If none of those conditions are met it raises an error explaining whats needs to be done.The workflow now clones
pyglotaran-examples
if it is run onpush
orpull_request
, that way pushes and PRs will use the correct commits instead of cloning code already onglotaran/pyglotaran-examples
.The CI will fail on this PR since it uses the action on
main
which still has the bug. Examples of the 3 different trigger events can be found here: