Skip to content

Commit

Permalink
Use Docker Buildx for building images in GitHub Actions workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
sentemon committed Nov 16, 2024
1 parent 4d77244 commit 0c0d702
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/post.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/')
Expand Down

0 comments on commit 0c0d702

Please sign in to comment.