From 8ca2571367031b0da84dd9c22e628b78cb83a343 Mon Sep 17 00:00:00 2001 From: Finn Evers Date: Wed, 3 Dec 2025 16:05:15 +0100 Subject: [PATCH] extension_ci: Do not trigger version bump on workflow file changes (#44077) Release Notes: - N/A Co-authored-by: Agus Zubiaga --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- extensions/workflows/bump_version.yml | 3 +++ .../src/tasks/workflows/extensions/bump_version.rs | 12 +++++++++--- 4 files changed, 15 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3c535c27415b776e3b4210a236f39a6f6d376954..1f56fec38b0267d1fe920f8ed89af98644bdd5ef 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6972,7 +6972,7 @@ dependencies = [ [[package]] name = "gh-workflow" version = "0.8.0" -source = "git+https://github.com/zed-industries/gh-workflow?rev=e5f883040530b4df36437f140084ee5cc7c1c9be#e5f883040530b4df36437f140084ee5cc7c1c9be" +source = "git+https://github.com/zed-industries/gh-workflow?rev=09acfdf2bd5c1d6254abefd609c808ff73547b2c#09acfdf2bd5c1d6254abefd609c808ff73547b2c" dependencies = [ "async-trait", "derive_more 2.0.1", @@ -6989,7 +6989,7 @@ dependencies = [ [[package]] name = "gh-workflow-macros" version = "0.8.0" -source = "git+https://github.com/zed-industries/gh-workflow?rev=e5f883040530b4df36437f140084ee5cc7c1c9be#e5f883040530b4df36437f140084ee5cc7c1c9be" +source = "git+https://github.com/zed-industries/gh-workflow?rev=09acfdf2bd5c1d6254abefd609c808ff73547b2c#09acfdf2bd5c1d6254abefd609c808ff73547b2c" dependencies = [ "heck 0.5.0", "quote", diff --git a/Cargo.toml b/Cargo.toml index 6cd80981ce62a245310e6e1a1d447bdc804aa32a..a6512c79093c197f5ed7a195f78bf7a170a15abe 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -508,7 +508,7 @@ fork = "0.4.0" futures = "0.3" futures-batch = "0.6.1" futures-lite = "1.13" -gh-workflow = { git = "https://github.com/zed-industries/gh-workflow", rev = "e5f883040530b4df36437f140084ee5cc7c1c9be" } +gh-workflow = { git = "https://github.com/zed-industries/gh-workflow", rev = "09acfdf2bd5c1d6254abefd609c808ff73547b2c" } git2 = { version = "0.20.1", default-features = false } globset = "0.4" handlebars = "4.3" diff --git a/extensions/workflows/bump_version.yml b/extensions/workflows/bump_version.yml index ad231298ec3848b165d8fd07ee664cb88ba6430d..7f4318dcf54ad8c9360ae622354530b2b54c6a03 100644 --- a/extensions/workflows/bump_version.yml +++ b/extensions/workflows/bump_version.yml @@ -8,6 +8,9 @@ on: push: branches: - main + paths-ignore: + - .github/** + workflow_dispatch: {} jobs: determine_bump_type: runs-on: namespace-profile-16x32-ubuntu-2204 diff --git a/tooling/xtask/src/tasks/workflows/extensions/bump_version.rs b/tooling/xtask/src/tasks/workflows/extensions/bump_version.rs index 44c72a11648fb1392d78437113fdf72148b9abed..1564fef448fc305897b9edcd64245255b8e0b168 100644 --- a/tooling/xtask/src/tasks/workflows/extensions/bump_version.rs +++ b/tooling/xtask/src/tasks/workflows/extensions/bump_version.rs @@ -1,5 +1,6 @@ use gh_workflow::{ - Event, Expression, Input, Job, PullRequest, PullRequestType, Push, Run, Step, UsesJob, Workflow, + Event, Expression, Input, Job, PullRequest, PullRequestType, Push, Run, Step, UsesJob, + Workflow, WorkflowDispatch, }; use indexmap::IndexMap; use indoc::indoc; @@ -18,8 +19,13 @@ pub(crate) fn bump_version() -> Workflow { named::workflow() .on(Event::default() - .push(Push::default().add_branch("main")) - .pull_request(PullRequest::default().add_type(PullRequestType::Labeled))) + .push( + Push::default() + .add_branch("main") + .add_ignored_path(".github/**"), + ) + .pull_request(PullRequest::default().add_type(PullRequestType::Labeled)) + .workflow_dispatch(WorkflowDispatch::default())) .concurrency(one_workflow_per_non_main_branch_and_token("labels")) .add_job(determine_bump_type.name, determine_bump_type.job) .add_job(call_bump_version.name, call_bump_version.job)