Move GITHUB_JOB_OVERRIDDEN to job ENV context

This commit is contained in:
Mikhail f. Shiryaev 2023-11-10 17:47:40 +01:00
parent 38b251946e
commit a831a648cd
No known key found for this signature in database
GPG Key ID: 4B02ED204C7D93F4
2 changed files with 6 additions and 3 deletions

View File

@ -25,6 +25,8 @@ name: Build ClickHouse
jobs: jobs:
Build: Build:
name: Build-${{inputs.build_name}} name: Build-${{inputs.build_name}}
env:
GITHUB_JOB_OVERRIDDEN: Build-${{inputs.build_name}}
runs-on: [self-hosted, '${{inputs.runner_type}}'] runs-on: [self-hosted, '${{inputs.runner_type}}']
steps: steps:
- name: Check out repository code - name: Check out repository code
@ -37,7 +39,6 @@ jobs:
- name: Set build envs - name: Set build envs
run: | run: |
cat >> "$GITHUB_ENV" << 'EOF' cat >> "$GITHUB_ENV" << 'EOF'
GITHUB_JOB_OVERRIDDEN=Build-${{inputs.build_name}}
${{inputs.additional_envs}} ${{inputs.additional_envs}}
EOF EOF
python3 "$GITHUB_WORKSPACE"/tests/ci/ci_config.py --build-name "${{inputs.build_name}}" >> "$GITHUB_ENV" python3 "$GITHUB_WORKSPACE"/tests/ci/ci_config.py --build-name "${{inputs.build_name}}" >> "$GITHUB_ENV"

View File

@ -51,7 +51,10 @@ jobs:
batches_output=$(python3 -c 'import json; print(json.dumps(list(range(${{inputs.batches}}))))') batches_output=$(python3 -c 'import json; print(json.dumps(list(range(${{inputs.batches}}))))')
echo "batches=${batches_output}" >> "$GITHUB_OUTPUT" echo "batches=${batches_output}" >> "$GITHUB_OUTPUT"
Test: 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}}'] runs-on: [self-hosted, '${{inputs.runner_type}}']
needs: [PrepareStrategy] needs: [PrepareStrategy]
strategy: strategy:
@ -69,7 +72,6 @@ jobs:
- name: Set build envs - name: Set build envs
run: | run: |
cat >> "$GITHUB_ENV" << 'EOF' cat >> "$GITHUB_ENV" << 'EOF'
GITHUB_JOB_OVERRIDDEN=${{inputs.test_name}}-${{matrix.batch}}
${{inputs.additional_envs}} ${{inputs.additional_envs}}
EOF EOF
- name: Common setup - name: Common setup