mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 08:32:02 +00:00
84e5870b71
* Revert "Revert "improve CI with digest for docker, build and test jobs"" * fix: docker manifest merge for missing images only
31 lines
959 B
YAML
31 lines
959 B
YAML
name: Common setup
|
|
description: Setup necessary environments
|
|
inputs:
|
|
job_type:
|
|
description: the name to use in the TEMP_PATH and REPO_COPY
|
|
default: common
|
|
type: string
|
|
nested_job:
|
|
description: the fuse for unintended use inside of the reusable callable jobs
|
|
default: true
|
|
type: boolean
|
|
runs:
|
|
using: "composite"
|
|
steps:
|
|
- name: Setup and check ENV
|
|
shell: bash
|
|
run: |
|
|
echo "Setup the common ENV variables"
|
|
cat >> "$GITHUB_ENV" << 'EOF'
|
|
TEMP_PATH=${{runner.temp}}/${{inputs.job_type}}
|
|
EOF
|
|
if [ -z "${{env.GITHUB_JOB_OVERRIDDEN}}" ] && [ "true" == "${{inputs.nested_job}}" ]; then
|
|
echo "The GITHUB_JOB_OVERRIDDEN ENV is unset, and must be set for the nested jobs"
|
|
exit 1
|
|
fi
|
|
- name: Setup $TEMP_PATH
|
|
shell: bash
|
|
run: |
|
|
# to remove every leftovers
|
|
sudo rm -fr "$TEMP_PATH" && mkdir -p "$TEMP_PATH"
|