Improve extension CI concurrency (#43935)

While this does work for PRs and such, it does not work with main...
Hence, moving the token a few chars to the right to fix this issue.

Release Notes:

- N/A
This commit is contained in:
Finn Evers
2025-12-01 20:29:20 +01:00
committed by GitHub
parent 64b432e4ac
commit bfb876c782
4 changed files with 5 additions and 10 deletions

View File

@@ -36,9 +36,7 @@ jobs:
call_bump_version:
needs:
- determine_bump_type
if: |-
(github.event.action == 'labeled' && needs.determine_bump_type.outputs.bump_type != 'patch') ||
github.event_name == 'push'
if: github.event.action != 'labeled' || needs.determine_bump_type.outputs.bump_type != 'patch'
uses: zed-industries/zed/.github/workflows/extension_bump.yml@main
secrets:
app-id: ${{ secrets.ZED_ZIPPY_APP_ID }}
@@ -47,5 +45,5 @@ jobs:
bump-type: ${{ needs.determine_bump_type.outputs.bump_type }}
force-bump: true
concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.ref_name == 'main' && github.sha || 'anyshalabels' }}
group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.ref_name == 'main' && github.sha || 'anysha' }}labels
cancel-in-progress: true

View File

@@ -9,5 +9,5 @@ jobs:
call_extension_tests:
uses: zed-industries/zed/.github/workflows/extension_tests.yml@main
concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.ref_name == 'main' && github.sha || 'anyshapr' }}
group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.ref_name == 'main' && github.sha || 'anysha' }}pr
cancel-in-progress: true

View File

@@ -31,10 +31,7 @@ pub(crate) fn call_bump_version(
) -> NamedJob<UsesJob> {
let job = Job::default()
.cond(Expression::new(format!(
indoc! {
"(github.event.action == 'labeled' && {} != 'patch') ||
github.event_name == 'push'"
},
"github.event.action != 'labeled' || {} != 'patch'",
bump_type.expr()
)))
.uses(

View File

@@ -88,7 +88,7 @@ pub fn one_workflow_per_non_main_branch_and_token<T: AsRef<str>>(token: T) -> Co
.group(format!(
concat!(
"${{{{ github.workflow }}}}-${{{{ github.ref_name }}}}-",
"${{{{ github.ref_name == 'main' && github.sha || 'anysha{}' }}}}"
"${{{{ github.ref_name == 'main' && github.sha || 'anysha' }}}}{}"
),
token.as_ref()
))