Skip to content

Commit

Permalink
chore: fix ttc workflow file (#564)
Browse files Browse the repository at this point in the history
* chore: fix workflow file

* chore: fix workflow file
  • Loading branch information
sundy-li authored Jan 6, 2025
1 parent e21aa93 commit f1fa5d4
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions .github/workflows/ttc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ on:
- main
tags:
- v*
pull_request:
branches:
- main
paths:
- 'core/**'
- 'driver/**'
Expand All @@ -23,10 +20,10 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v3

- name: Login to DockerHub
uses: docker/login-action@v3
Expand All @@ -35,13 +32,23 @@ jobs:
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Set Docker tag
run: echo "DOCKER_TAG=${{ startsWith(github.ref, 'refs/tags/') && github.ref[10:] || 'latest' }}" >> $GITHUB_ENV
shell: bash
run: |
ref_v="${{ github.ref }}"
if [[ $ref_v == refs/tags/* ]]; then
DOCKER_TAG=${ref_v:10}
else
DOCKER_TAG="latest"
fi
echo "DOCKER_TAG=$DOCKER_TAG" >> $GITHUB_ENV
- name: Print Docker tag
run: echo "Start to build and publish: datafuselabs/ttc-rust:$DOCKER_TAG"
shell: bash
run: |
echo "Start to build and publish: datafuselabs/ttc-rust:$DOCKER_TAG"
- name: TTC Build and push
uses: docker/build-push-action@v2
uses: docker/build-push-action@v6
with:
push: true
file: ./ttc/Dockerfile
Expand Down

0 comments on commit f1fa5d4

Please sign in to comment.