Add build target
This commit is contained in:
@@ -19,6 +19,10 @@ on:
|
|||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
default: ""
|
default: ""
|
||||||
|
target:
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
default: ""
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
@@ -49,7 +53,15 @@ jobs:
|
|||||||
${{ inputs.build-args }}
|
${{ inputs.build-args }}
|
||||||
EOF
|
EOF
|
||||||
echo "Final BUILD_ARGS: $BUILD_ARGS"
|
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 }}:${{ inputs.tag }} \
|
||||||
-t ${{ vars.REGISTRY }}/${{ gitea.repository }}:${{ gitea.sha }}
|
-t ${{ vars.REGISTRY }}/${{ gitea.repository }}:${{ gitea.sha }}
|
||||||
- name: Push
|
- name: Push
|
||||||
|
|||||||
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
.idea
|
||||||
Reference in New Issue
Block a user