Skip to content

feat: tweak table data life-cycle related sql stmts #330

feat: tweak table data life-cycle related sql stmts

feat: tweak table data life-cycle related sql stmts #330

Workflow file for this run

name: Cloud
on:
pull_request_target:
types:
- labeled
branches:
- main
permissions:
id-token: write
pull-requests: write
contents: read
env:
BUILD_PROFILE: release
RUNNER_PROVIDER: gcp
jobs:
build:
if: contains(github.event.pull_request.labels.*.name, 'ci-cloud') || contains(github.event.pull_request.labels.*.name, 'ci-benchmark')
runs-on: [self-hosted, X64, Linux, 16c32g, gcp]
outputs:
sha: ${{ steps.sha.outputs.sha }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: "refs/pull/${{ github.event.number }}/merge"
- name: Get SHA
shell: bash
id: sha
run: |
echo "sha=$(git rev-parse --verify HEAD)" > $GITHUB_OUTPUT
- name: Build Release
uses: ./.github/actions/build_linux
timeout-minutes: 30
with:
sha: ${{ steps.sha.outputs.sha }}
target: x86_64-unknown-linux-gnu
artifacts: meta,query
docker:
needs: build
timeout-minutes: 10
runs-on: [self-hosted, X64, Linux, 4c8g, gcp]
outputs:
tag: ${{ steps.prepare.outputs.tag }}
steps:
- uses: actions/checkout@v4
- name: Download artifact
uses: ./.github/actions/artifact_download
with:
sha: ${{ needs.build.outputs.sha }}
target: x86_64-unknown-linux-gnu
artifacts: meta,query
- name: Prepare docker build
run: |
mkdir -p ./distro/linux/amd64
cp ./target/release/databend-* ./distro/linux/amd64
- uses: ./.github/actions/setup_docker
id: login
with:
repo: databend-query
ecr_role_arn: ${{ secrets.ECR_ROLE_ARN }}
- name: Prepare for docker
id: prepare
run: |
mkdir -p ./distro/linux/amd64
cp ./target/release/databend-query ./distro/linux/amd64/databend-query
short_sha=$(echo "${{ needs.build.outputs.sha }}" | cut -c1-7)
echo "tag=pr-${{ github.event.pull_request.number }}-${short_sha}" >> $GITHUB_OUTPUT
- name: push service image
uses: docker/build-push-action@v3
with:
push: true
tags: ${{ steps.login.outputs.ecr_repo }}:${{ steps.prepare.outputs.tag }}
platforms: linux/amd64
context: .
file: ./docker/debian/query.Dockerfile
- name: Comment on PR
uses: everpcpc/comment-on-pr-action@v1
with:
number: ${{ github.event.pull_request.number }}
token: ${{ github.token }}
body: |
## Docker Image for PR
* **tag**: `${{ steps.prepare.outputs.tag }}`
> note: this image tag is only available for internal use,
> please check the [internal doc](https://datafuselabs.feishu.cn/wiki/Hk7iwYsnWi3wsXkpbW5c9apTn0b) for more details.
benchmark:
if: contains(github.event.pull_request.labels.*.name, 'ci-benchmark')
needs: [build, docker]
uses: ./.github/workflows/reuse.benchmark.yml
secrets: inherit
with:
sha: ${{ needs.build.outputs.sha }}
run_id: ${{ github.run_id }}
source: pr
source_id: ${{ github.event.pull_request.number }}
version: ${{ needs.docker.outputs.tag }}
runner_provider: aws