add working dir for docker builds
This commit is contained in:
@@ -20,6 +20,7 @@ Build a Docker image and push it to the Gitea container registry
|
||||
| `ARTIFACT_NAME` | <p>Name of the build artifact to download</p> | `false` | `dist` |
|
||||
| `ARTIFACT_PATH` | <p>Destination path for the downloaded artifact</p> | `false` | `dist` |
|
||||
| `TAG_LATEST` | <p>Also tag and push the image as latest</p> | `false` | `false` |
|
||||
| `WORKING_DIRECTORY` | <p>Working directory for the Docker build</p> | `false` | `.` |
|
||||
<!-- action-docs-inputs source="action.yml" -->
|
||||
|
||||
<!-- action-docs-runs source="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
|
||||
|
||||
Reference in New Issue
Block a user