Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
sungwy committed Nov 28, 2024
1 parent f590470 commit 84632a0
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions .github/workflows/publish-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ on:

env:
DOCKER_IMAGE_TAG: iceberg-rest-fixture
DOCKER_IMAGE_VERSION: latest

jobs:
build:
Expand All @@ -42,13 +43,13 @@ jobs:
- name: Login to Docker Hub
run: |
docker login -u ${{ secrets.DOCKERHUB_USER }} -p ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build Docker Image
run: docker build -t ${{ secrets.DOCKERHUB_USER }}/$DOCKER_IMAGE_TAG -f docker/iceberg-rest-adapter-image/Dockerfile .
- name: Push Docker Image with latest tag
if: github.event_name == 'workflow_dispatch'
run: docker push ${{ secrets.DOCKERHUB_USER }}/$DOCKER_IMAGE_TAG:latest
- name: Push Docker Image with version tag
- name: Set the tagged version
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
run: |
echo "DOCKER_IMAGE_VERSION=`echo refs/tags/apache-iceberg-1.7.1 | tr -d -c 0-9.`" >> "$GITHUB_ENV"
- name: Build Docker Image
run: docker build -t ${{ secrets.DOCKERHUB_USER }}/$DOCKER_IMAGE_TAG:$DOCKER_IMAGE_VERSION -f docker/iceberg-rest-adapter-image/Dockerfile .
- name: Push Docker Image
# for tag 'apache-iceberg-1.7.0', publish image 'apache/iceberg-rest-fixture:1.7.1'
run: |
docker push ${{ secrets.DOCKERHUB_USER }}/$DOCKER_IMAGE_TAG:`echo refs/tags/apache-iceberg-1.7.1 | tr -d -c 0-9.`
docker push ${{ secrets.DOCKERHUB_USER }}/$DOCKER_IMAGE_TAG:$DOCKER_IMAGE_VERSION

0 comments on commit 84632a0

Please sign in to comment.