From 0c0d7029c0a283db74b7b366334b92ce4f7743bf Mon Sep 17 00:00:00 2001 From: Ivan Sentemon Date: Sat, 16 Nov 2024 17:44:00 +0100 Subject: [PATCH] Use Docker Buildx for building images in GitHub Actions workflow --- .github/workflows/post.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/post.yml b/.github/workflows/post.yml index 1014bd7..febe22c 100644 --- a/.github/workflows/post.yml +++ b/.github/workflows/post.yml @@ -54,10 +54,11 @@ jobs: if [[ "$GITHUB_REF" == refs/tags/* ]]; then IMAGE_VERSION=${GITHUB_REF#refs/tags/} fi - docker build \ + docker buildx build \ --build-arg ASPNETCORE_ENVIRONMENT=${{ secrets.ASPNETCORE_ENVIRONMENT }} \ --build-arg DB_CONNECTION_STRING=${{ secrets.DB_CONNECTION_STRING }} \ - -t ${{ secrets.DOCKER_HUB_USERNAME }}/post-service:${IMAGE_VERSION} -f ./backend/src/PostService/Dockerfile ./backend/src + -t ${{ secrets.DOCKER_HUB_USERNAME }}/post-service:${IMAGE_VERSION} \ + -f ./backend/src/PostService/Dockerfile ./backend/src \ - name: Push Docker image to Docker Hub if: startsWith(github.ref, 'refs/tags/')