Skip to content

Commit 76839d1

Browse files
authored
fix(ci): Fix docker build (#317)
1 parent 0112e6d commit 76839d1

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

.github/workflows/docker-build.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ on:
77
description: "Docker image (e.g. docker.io/<org>/<repo>)"
88
type: string
99
required: true
10+
file:
11+
description: "Path to Dockerfile relative to the repository root"
12+
type: string
13+
default: "Dockerfile"
1014
context:
1115
description: "Docker build context"
1216
type: string
@@ -60,6 +64,7 @@ jobs:
6064
uses: docker/build-push-action@v5
6165
with:
6266
context: ${{ inputs.context }}
67+
file: ${{ inputs.file }}
6368
push: ${{ inputs.push }}
6469
tags: ${{ steps.meta.outputs.tags }}
6570
cache-from: type=gha

.github/workflows/docker-ci.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ jobs:
1818
secrets: inherit
1919
with:
2020
image: docker.io/${{ vars.DOCKERHUB_USERNAME }}/${{ matrix.image }}
21-
context: ./${{ matrix.image }}
21+
context: .
22+
file: ./${{ matrix.image }}/Dockerfile
2223
push: true
2324
tag_with_version: false

.github/workflows/release.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ jobs:
5555
uses: ./.github/workflows/docker-build.yml
5656
with:
5757
image: docker.io/${{ vars.DOCKERHUB_USERNAME }}/${{ matrix.image }}
58-
context: ./${{ matrix.image }}
58+
context: .
59+
file: ./${{ matrix.image }}/Dockerfile
5960
push: true
6061
tag_with_version: true
6162
version: ${{ needs.version.outputs.version }}

0 commit comments

Comments
 (0)