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_NAME` | <p>Name of the build artifact to download</p> | `false` | `dist` |
|
||||||
| `ARTIFACT_PATH` | <p>Destination path for the downloaded artifact</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` |
|
| `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-inputs source="action.yml" -->
|
||||||
|
|
||||||
<!-- action-docs-runs source="action.yml" -->
|
<!-- action-docs-runs source="action.yml" -->
|
||||||
|
|||||||
@@ -28,6 +28,9 @@ inputs:
|
|||||||
TAG_LATEST:
|
TAG_LATEST:
|
||||||
description: "Also tag and push the image as latest"
|
description: "Also tag and push the image as latest"
|
||||||
default: "false"
|
default: "false"
|
||||||
|
WORKING_DIRECTORY:
|
||||||
|
description: "Working directory for the Docker build"
|
||||||
|
default: "."
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: composite
|
using: composite
|
||||||
@@ -52,7 +55,7 @@ runs:
|
|||||||
if [ "${{ inputs.TAG_LATEST }}" = "true" ]; then
|
if [ "${{ inputs.TAG_LATEST }}" = "true" ]; then
|
||||||
TAGS="$TAGS -t ${{ inputs.IMAGE_PATH }}:latest"
|
TAGS="$TAGS -t ${{ inputs.IMAGE_PATH }}:latest"
|
||||||
fi
|
fi
|
||||||
docker buildx build -f Dockerfile . \
|
docker buildx build -f ${{ inputs.WORKING_DIRECTORY }}/Dockerfile ${{ inputs.WORKING_DIRECTORY }} \
|
||||||
--platform ${{ inputs.PLATFORMS }} \
|
--platform ${{ inputs.PLATFORMS }} \
|
||||||
--push \
|
--push \
|
||||||
$TAGS
|
$TAGS
|
||||||
|
|||||||
Reference in New Issue
Block a user