Don't run the cron scheduled tox github workflow on forks #3699
Unanswered
zeitounator
asked this question in
Ideas
Replies: 1 comment
-
Thanks for reporting this.
It seems this suggestion looks good to us. Once this feature is supportde in github action, feel free to raise a PR. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Note: Not really a bug (but didn't know where else to put it), more of an annoyance and not related to molecule itself but to the CI.
The following describes when to run the tox workflow in github actions
https://github.com/ansible-community/molecule/blob/6fdc8478662353ea8017d06f5027d8fc3e8d3ec8/.github/workflows/tox.yml#L3-L13
The cron schedule is triggered everywhere regardless of the actual repo. So it it also starts in each fork and most probably fails everywhere as it does in my current fork and sending mail alerts for failure if configured.
I see two problems with this:
Reading a bit on the subject, it seems there is not yet any clean and straightforward way to fix that. The only workarround for the moment is to put a condition on each job in the workflow looking something like:
which is definitively ugly and inefficient (needs to be repeated on each job in the workflow...)
There is a suggestion to enhance the schedule declaration with new keywords but it has not been picked-up nor answered yet.
I did not produce a PR as I feel the current workaround is not satisfactory. But I'm happy to do so. Just tell me.
Issue Type
Molecule and Ansible details
N/A: CI based
Molecule installation method (one of):
N/A: CI based
Ansible installation method (one of):
N/A: CI based
Detail any linters or test runners used:
None
Desired Behavior
The cron scheduled tox workflow does not run on forked repositories
Actual Behaviour
The cron scheduled tox workflow is running every day on forked repositories (and alerting for failure, at least on my fork)
Beta Was this translation helpful? Give feedback.
All reactions