Skip to content

Commit 2b7a269

Browse files
committed
fix: docker image build and push context and file path
1 parent 01ee150 commit 2b7a269

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed
Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ permissions:
1111

1212

1313
jobs:
14-
build-test:
14+
test:
1515
runs-on: ubuntu-latest
16-
name: Build and Test
16+
name: Test
1717
env:
1818
TSKZ_HTTP_API_KEY: ${{ secrets.TSKZ_HTTP_API_KEY }}
1919
defaults:
@@ -43,12 +43,9 @@ jobs:
4343
docker-deploy:
4444
name: Build and Push Docker Image
4545
runs-on: ubuntu-latest
46-
needs: build-test
46+
needs: test
4747
environment:
4848
name: docker_hub
49-
defaults:
50-
run:
51-
working-directory: backend
5249

5350
steps:
5451
- name: Checkout code
@@ -61,20 +58,23 @@ jobs:
6158
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
6259

6360
- name: Set up Docker Buildx
61+
id: buildx
6462
uses: docker/setup-buildx-action@v3
6563

6664
- name: Build and push image to Docker Hub
6765
uses: docker/build-push-action@v5
6866
with:
69-
context: .
67+
builder: ${{ steps.buildx.outputs.name }}
68+
context: "{{defaultContext}}:backend"
69+
file: Dockerfile
7070
push: true
71-
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/taskaza:latest
71+
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/taskaza:${{ github.sha }}
7272

7373

7474
deploy-to-render:
7575
name: Deploy to Render
7676
runs-on: ubuntu-latest
77-
needs: docker-deploy
77+
needs: test
7878
environment:
7979
name: render
8080
defaults:

0 commit comments

Comments
 (0)