Add build target #2

Merged
kbaas merged 1 commits from feature/add-build-target into main 2026-01-28 08:53:44 +00:00
2 changed files with 14 additions and 1 deletions
Showing only changes of commit 93c20f5643 - Show all commits

View File

@@ -19,6 +19,10 @@ on:
required: false
type: string
default: ""
target:
required: false
type: string
default: ""
jobs:
build:
@@ -49,7 +53,15 @@ jobs:
${{ inputs.build-args }}
EOF
echo "Final BUILD_ARGS: $BUILD_ARGS"
docker build . $BUILD_ARGS \
TARGET_ARG=""
if [ -n "${{ inputs.target }}" ]; then
TARGET_ARG="--target ${{ inputs.target }}"
fi
docker build . \
$TARGET_ARG \
$BUILD_ARGS \
-t ${{ vars.REGISTRY }}/${{ gitea.repository }}:${{ inputs.tag }} \
-t ${{ vars.REGISTRY }}/${{ gitea.repository }}:${{ gitea.sha }}
- name: Push

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
.idea