Skip to content

Commit

Permalink
Use docker/build-push-action
Browse files Browse the repository at this point in the history
  • Loading branch information
grieve54706 committed May 24, 2024
1 parent 0505442 commit d962ba3
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 25 deletions.
24 changes: 15 additions & 9 deletions .github/workflows/build-dev-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ jobs:
working-directory: ./ibis-server
steps:
- uses: actions/checkout@v4
- id: prepare_tag
run: |
LATEST_COMMIT=$(git log -1 --pretty=%h)
echo "tag_name=main-${LATEST_COMMIT}" >> $GITHUB_ENV
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
Expand All @@ -64,12 +68,14 @@ jobs:
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and Push Docker image
run: |
LATEST_COMMIT=$(git log -1 --pretty=%h)
docker buildx build \
--platform linux/amd64,linux/arm64 \
--tag ghcr.io/canner/wren-engine-ibis:${LATEST_COMMIT} \
--tag ghcr.io/canner/wren-engine-ibis:nightly \
--file Dockerfile \
--push .
- name: Build and push
uses: docker/build-push-action@v5
env:
TAG_NAME: ${{ steps.prepare_tag.outputs.tag_name }}
with:
file: ./Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: |
ghcr.io/canner/wren-engine-ibis:${TAG_NAME}
ghcr.io/canner/wren-engine-ibis:nightly
15 changes: 8 additions & 7 deletions .github/workflows/build-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,13 @@ jobs:
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and Push Docker image
- name: Build and push
uses: docker/build-push-action@v5
env:
TAG_NAME: ${{ needs.prepare-tag.outputs.tag_name }}
run: |
docker buildx build \
--platform linux/amd64,linux/arm64 \
--tag ghcr.io/canner/wren-engine-ibis:${TAG_NAME} \
--file Dockerfile \
--push .
with:
file: ./Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: |
ghcr.io/canner/wren-engine-ibis:${TAG_NAME}
19 changes: 10 additions & 9 deletions .github/workflows/stable-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,13 +117,14 @@ jobs:
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and Push Docker image
- name: Build and push
uses: docker/build-push-action@v5
env:
TAG_NAME: ${{ steps.prepare-ibis-version.outputs.next_version }}
run: |
docker buildx build \
--platform linux/amd64,linux/arm64 \
--tag ghcr.io/canner/wren-engine-ibis:${TAG_NAME} \
--tag ghcr.io/canner/wren-engine-ibis:latest \
--file Dockerfile \
--push .
TAG_NAME: ${{ needs.prepare-ibis-version.outputs.next_version }}
with:
file: ./Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: |
ghcr.io/canner/wren-engine-ibis:${TAG_NAME}
ghcr.io/canner/wren-engine-ibis:latest

0 comments on commit d962ba3

Please sign in to comment.