1515 description : ' Docker image. If no tag, it will be determined by version_helper.py'
1616 required : true
1717 type : string
18+ version :
19+ description : ' Version tag. If no version, it will be determined by version_helper.py'
20+ required : false
21+ type : string
22+ default : " "
23+ tag-suffix :
24+ description : ' Tag suffix. To be appended the version from version_helper.py'
25+ required : false
26+ type : string
27+ default : " "
1828env :
1929 PYTHONUNBUFFERED : 1
2030 AWS_ACCESS_KEY_ID : ${{ secrets.AWS_ACCESS_KEY_ID }}
@@ -40,17 +50,25 @@ jobs:
4050 sudo apt-get install -y python3-pip python3-venv
4151 python3 -m venv venv
4252 source venv/bin/activate
43- pip install --upgrade requests chardet urllib3
53+ pip install --upgrade requests chardet urllib3 unidiff boto3 PyGithub
4454 pip install testflows==$TESTFLOWS_VERSION awscli==1.33.28
4555 echo PATH=$PATH >>$GITHUB_ENV
4656
4757 - name : Set image tag if not given
4858 if : ${{ !contains(inputs.docker_image, ':') }}
4959 id : set_version
60+ env :
61+ TAG_SUFFIX : ${{ inputs.tag-suffix }}
62+ SPECIFIED_VERSION : ${{ inputs.version }}
5063 run : |
5164 python3 ./tests/ci/version_helper.py | tee /tmp/version_info
5265 source /tmp/version_info
53- echo "docker_image=${{ inputs.docker_image }}:${{ github.event.pull_request.number || 0 }}-$CLICKHOUSE_VERSION_STRING" >> $GITHUB_OUTPUT
66+ if [ -z "$SPECIFIED_VERSION" ]; then
67+ VERSION=$CLICKHOUSE_VERSION_STRING
68+ else
69+ VERSION=$SPECIFIED_VERSION
70+ fi
71+ echo "docker_image=${{ inputs.docker_image }}:$PR_NUMBER-$VERSION$TAG_SUFFIX" >> $GITHUB_OUTPUT
5472 echo "commit_sha=$CLICKHOUSE_VERSION_GITHASH" >> $GITHUB_OUTPUT
5573
5674 - name : Run Grype Scan
6886 env :
6987 S3_BUCKET : " altinity-build-artifacts"
7088 COMMIT_SHA : ${{ steps.set_version.outputs.commit_sha || github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
71- PR_NUMBER : ${{ github.event.pull_request.number || 0 }}
89+ PR_NUMBER : ${{ env.PR_NUMBER || github.event.pull_request.number || 0 }}
7290 DOCKER_IMAGE : ${{ steps.set_version.outputs.docker_image || inputs.docker_image }}
7391 run : |
92+ echo "PR_NUMBER=$PR_NUMBER"
7493 ./.github/grype/transform_and_upload_results_s3.sh
7594
7695 - name : Create step summary
0 commit comments