From abeb9d04d05aa53433a7772f3248f47303390733 Mon Sep 17 00:00:00 2001 From: Deac Date: Fri, 29 May 2026 11:12:35 -0400 Subject: [PATCH] add working dir for docker builds --- .gitea/actions/docker/README.md | 1 + .gitea/actions/docker/action.yml | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.gitea/actions/docker/README.md b/.gitea/actions/docker/README.md index fba6a89..aefd183 100644 --- a/.gitea/actions/docker/README.md +++ b/.gitea/actions/docker/README.md @@ -20,6 +20,7 @@ Build a Docker image and push it to the Gitea container registry | `ARTIFACT_NAME` |

Name of the build artifact to download

| `false` | `dist` | | `ARTIFACT_PATH` |

Destination path for the downloaded artifact

| `false` | `dist` | | `TAG_LATEST` |

Also tag and push the image as latest

| `false` | `false` | +| `WORKING_DIRECTORY` |

Working directory for the Docker build

| `false` | `.` | diff --git a/.gitea/actions/docker/action.yml b/.gitea/actions/docker/action.yml index 3275052..44b632b 100644 --- a/.gitea/actions/docker/action.yml +++ b/.gitea/actions/docker/action.yml @@ -28,6 +28,9 @@ inputs: TAG_LATEST: description: "Also tag and push the image as latest" default: "false" + WORKING_DIRECTORY: + description: "Working directory for the Docker build" + default: "." runs: using: composite @@ -52,7 +55,7 @@ runs: if [ "${{ inputs.TAG_LATEST }}" = "true" ]; then TAGS="$TAGS -t ${{ inputs.IMAGE_PATH }}:latest" fi - docker buildx build -f Dockerfile . \ + docker buildx build -f ${{ inputs.WORKING_DIRECTORY }}/Dockerfile ${{ inputs.WORKING_DIRECTORY }} \ --platform ${{ inputs.PLATFORMS }} \ --push \ $TAGS