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

don't run GHA workflows on tag pushes #6510

Merged
merged 1 commit into from
Sep 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions .github/workflows/hakari.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@ on:
push:
branches:
- main
pull_request:
branches:
- main
- 'rel/**'
pull_request: {}

name: cargo hakari

Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@
#
name: Rust

on: [ push, pull_request ]
on:
push:
branches:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So if I understand correctly, the reason this is required is because GitHub ridiculously includes tags in the push event, and we had no filter at all here to begin with, but now we explicitly restrict it to this set of branches?

Do we want to, perhaps, do it for all branches (just not tags)? That's how buildomat works for example.

Copy link
Contributor Author

@iliana iliana Sep 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm fine either way; I think the vast majority of push events to other branches are redundant with the pull request events, and we need the pull request events to handle PRs from forks.

Another approach might be to run the workflow on any push to a branch, and only run pull request workflows if they come from a fork. I don't know if that's possible.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In practice I think we would only particularly care if an artefact we expect to download and run (for a non-PR work in progress branch) was missing. Those come from buildomat, not GHA, so I expect making this change is likely fine as-is!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(have you had a chance to run the numbers on cost/time savings if buildomat did filter out non-PR branches, btw?)

- main
- 'rel/**'
pull_request: {}

jobs:
check-style:
Expand Down
Loading