Skip to content

Conversation

@gojimmypi
Copy link
Contributor

Description

Same as wolfSSL/wolfssl#8936, but for wolfSSH:

Continues the pattern of running wolfssl GitHub workflows only on wolfssl repository owner:

    if: github.repository_owner == 'wolfssl'
    runs-on: 

At one point, it was only annoying when some of the job would fail in my fork.

While viewing my GitHub Billing, I noticed a recent increase in "charges" related to workflows that run on my fork of wolfssl when I add commits.

I'm not sure if this is a new feature, perhaps something coming soon, that might have an adverse affect on forks that do not have free tiers. In any case, it is a waste of computing resources to blindly run all of the workflows in a fork.

If desired, they can be manually enabled.

See also: wolfSSL/wolfssl#7871

image

Fixes zd# n/a

Testing

How did you test?

"tested" on my branch only (to confirm the workflows didn't run)

Checklist

  • added tests
  • updated/added doxygen
  • updated appropriate READMEs
  • Updated manual and documentation

@ejohnstown
Copy link
Contributor

What if we added limits to which branches the test would be run on to 'master', 'main', or 'release/*'?

@gojimmypi
Copy link
Contributor Author

Instead of the if: github.repository_owner == 'wolfssl' ? The jobs would still all unnecessarily run in our forks on the 'master', 'main' when we sync to upstream.

In addition? That might be a good idea if for some reason the repository itself has branches where we don't want the job to run. Does that occur? Generally a PR comes from a user fork, not a local branch, eh?

@ejohnstown
Copy link
Contributor

I think the better solution is to disable running the actions in your own fork. The option is in your repo's Settings:Actions:General. I want the actions to run automatically whenever I push a commit to a branch.

@gojimmypi
Copy link
Contributor Author

Well, the best solution is to have all the actions disabled by default. Bit that's not what GitHub is doing today.

If you, as a maintainer want the actions to always run for you, I could see that being part of the condition.

I do not believe that all the workflows should run for all the users in all the forks and all the branches for every change.

Just my suggestion - if you prefer to close without merging. :)

@ejohnstown
Copy link
Contributor

And I think it should be left to the repo owner to disable actions if they want to. The only way to enable them with this PR is to edit the actions as part of the branch so they run, then take the changes out after. With the repo setting, it's just a click.

@ejohnstown
Copy link
Contributor

I believe this should be solved by turning off the actions in your own repo's setting rather than affecting everyone.

I don't think adding an if: to every test is correct, either. The actions still run, they just stop immediately. If you remove run:on:push from the workflows, they won't run on pushes, but will still run on pull-requests which we always want.

My two-bits.

@ejohnstown ejohnstown closed this Jul 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants