Improve extension CI concurrency (#43935)
Finn Evers
created 1 week ago
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
Change summary
extensions/workflows/bump_version.yml | 6 ++----
extensions/workflows/run_tests.yml | 2 +-
tooling/xtask/src/tasks/workflows/extensions/bump_version.rs | 5 +----
tooling/xtask/src/tasks/workflows/vars.rs | 2 +-
4 files changed, 5 insertions(+), 10 deletions(-)
Detailed changes
@@ -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
@@ -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
@@ -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(
@@ -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()
))