Skip to content

Commit

Permalink
fix: docker build ci
Browse files Browse the repository at this point in the history
  • Loading branch information
yevheniyJ committed Dec 13, 2024
1 parent 6741720 commit 7bf8fa9
Showing 1 changed file with 15 additions and 14 deletions.
29 changes: 15 additions & 14 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -203,23 +203,24 @@ jobs:
run: |
cp packages/docker/Dockerfile Dockerfile
# to enable buildx (multiplatform build)
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
registry: docker.io
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3

- name: Build Docker image
run: |
docker login -u "${{ secrets.DOCKER_USERNAME }}" -p "${{ secrets.DOCKER_PASSWORD }}" docker.io
echo "Logged in"
docker buildx create --name container --driver=docker-container
echo "Created container for build"
docker buildx build --builder container --platform linux/amd64,linux/arm64 --output="type=image" --pull -t "${{ secrets.DOCKER_HUB_REGISTRY_IMAGE }}:${{ github.ref_name }}" -t "${{ secrets.DOCKER_HUB_REGISTRY_IMAGE }}:latest" .
echo "Image build successful"
docker image ls
docker push "${{ secrets.DOCKER_HUB_REGISTRY_IMAGE }}:${{ github.ref_name }}"
echo "First push succeed"
docker push "${{ secrets.DOCKER_HUB_REGISTRY_IMAGE }}:latest"
echo "Second push succeed"
- name: Build and push
uses: docker/build-push-action@v6
with:
platforms: linux/amd64,linux/arm64
push: true
tags: |
"${{ secrets.DOCKER_HUB_REGISTRY_IMAGE }}:${{ github.ref_name }}"
"${{ secrets.DOCKER_HUB_REGISTRY_IMAGE }}:latest"
exe:
runs-on: windows-latest
Expand Down

0 comments on commit 7bf8fa9

Please sign in to comment.