diff --git a/.github/workflows/reusable_build.yml b/.github/workflows/reusable_build.yml index f6586016874..7b88c2b9925 100644 --- a/.github/workflows/reusable_build.yml +++ b/.github/workflows/reusable_build.yml @@ -25,6 +25,8 @@ name: Build ClickHouse jobs: Build: name: Build-${{inputs.build_name}} + env: + GITHUB_JOB_OVERRIDDEN: Build-${{inputs.build_name}} runs-on: [self-hosted, '${{inputs.runner_type}}'] steps: - name: Check out repository code @@ -37,7 +39,6 @@ jobs: - name: Set build envs run: | cat >> "$GITHUB_ENV" << 'EOF' - GITHUB_JOB_OVERRIDDEN=Build-${{inputs.build_name}} ${{inputs.additional_envs}} EOF python3 "$GITHUB_WORKSPACE"/tests/ci/ci_config.py --build-name "${{inputs.build_name}}" >> "$GITHUB_ENV" diff --git a/.github/workflows/reusable_test.yml b/.github/workflows/reusable_test.yml index 19939d114f2..4e65733542a 100644 --- a/.github/workflows/reusable_test.yml +++ b/.github/workflows/reusable_test.yml @@ -51,7 +51,10 @@ jobs: batches_output=$(python3 -c 'import json; print(json.dumps(list(range(${{inputs.batches}}))))') echo "batches=${batches_output}" >> "$GITHUB_OUTPUT" Test: - name: ${{inputs.test_name}}-${{matrix.batch}} + # Do not add `-0` to the end, if there's only one batch + name: ${{inputs.test_name}}${{ inputs.batches > 1 && format('-{0}',matrix.batch) || '' }} + env: + GITHUB_JOB_OVERRIDDEN: ${{inputs.test_name}}${{ inputs.batches > 1 && format('-{0}',matrix.batch) || '' }} runs-on: [self-hosted, '${{inputs.runner_type}}'] needs: [PrepareStrategy] strategy: @@ -69,7 +72,6 @@ jobs: - name: Set build envs run: | cat >> "$GITHUB_ENV" << 'EOF' - GITHUB_JOB_OVERRIDDEN=${{inputs.test_name}}-${{matrix.batch}} ${{inputs.additional_envs}} EOF - name: Common setup