Compare commits
1 Commits
2025-10-01
...
2025-12-16
| Author | SHA1 | Date | |
|---|---|---|---|
| 5bc1018327 |
@@ -31,6 +31,11 @@ on:
|
|||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
default: development
|
default: development
|
||||||
|
extra-build-args:
|
||||||
|
description: "Extra build args to pass to the Docker build, separate by space"
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
default: ""
|
||||||
|
|
||||||
secrets:
|
secrets:
|
||||||
PASSWORD:
|
PASSWORD:
|
||||||
@@ -43,6 +48,7 @@ env:
|
|||||||
LABEL: ${{ inputs.package-label }}
|
LABEL: ${{ inputs.package-label }}
|
||||||
ARTIFACT_UPLOAD: ${{ env.ACT_EXEC == 'true' && 'actions/upload-artifact@v2' || 'actions/upload-artifact@v3' }}
|
ARTIFACT_UPLOAD: ${{ env.ACT_EXEC == 'true' && 'actions/upload-artifact@v2' || 'actions/upload-artifact@v3' }}
|
||||||
ARTIFACT_DOWNLOAD: ${{ env.ACT_EXEC == 'true' && 'actions/download-artifact@v2' || 'actions/download-artifact@v3' }}
|
ARTIFACT_DOWNLOAD: ${{ env.ACT_EXEC == 'true' && 'actions/download-artifact@v2' || 'actions/download-artifact@v3' }}
|
||||||
|
EXTRA_ARGS: ${{ inputs.extra-build-args }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
@@ -71,7 +77,14 @@ jobs:
|
|||||||
|
|
||||||
- name: Build container
|
- name: Build container
|
||||||
run: |
|
run: |
|
||||||
buildah build -f ${{inputs.dockerfile}} --build-arg GIT_TOKEN=${{secrets.GIT_TOKEN}} --build-arg VERSION=${{inputs.version}} -t gitea.ampenberger.com/${{inputs.git_user}}/${PACKAGE_NAME}:${LABEL}
|
# split the extra-args and construct build-arg parameters
|
||||||
|
set -- ${EXTRA_ARGS}
|
||||||
|
args=""
|
||||||
|
for p in "$@"; do
|
||||||
|
args="$args --build-arg ${p}"
|
||||||
|
done
|
||||||
|
|
||||||
|
buildah build -f ${{inputs.dockerfile}} --build-arg GIT_TOKEN=${{secrets.GIT_TOKEN}} --build-arg VERSION=${{inputs.version}} ${args} -t gitea.ampenberger.com/${{inputs.git_user}}/${PACKAGE_NAME}:${LABEL}
|
||||||
|
|
||||||
echo "Built ${PACKAGE_NAME}:${LABEL}"
|
echo "Built ${PACKAGE_NAME}:${LABEL}"
|
||||||
buildah images
|
buildah images
|
||||||
|
|||||||
Reference in New Issue
Block a user