feat: add context log
This commit is contained in:
parent
4bedfc30b7
commit
7ad75eb628
1 changed files with 14 additions and 12 deletions
10
action.yml
10
action.yml
|
|
@ -35,18 +35,20 @@ runs:
|
||||||
echo '{"auths":{"${{ inputs.registry }}":{"auth":"'$(printf "%s:%s" "${{ inputs.username }}" "${{ inputs.password }}" | base64 | tr -d '\n')'"}}}' > /kaniko/.docker/config.json
|
echo '{"auths":{"${{ inputs.registry }}":{"auth":"'$(printf "%s:%s" "${{ inputs.username }}" "${{ inputs.password }}" | base64 | tr -d '\n')'"}}}' > /kaniko/.docker/config.json
|
||||||
|
|
||||||
# Resolve build context
|
# Resolve build context
|
||||||
if [ -n "${{ inputs.context }}" ]; then
|
|
||||||
case "${{ inputs.context }}" in
|
case "${{ inputs.context }}" in
|
||||||
/*)
|
/*)
|
||||||
|
echo "🔧 Using absolute context: ${{ inputs.context }}"
|
||||||
CONTEXT="${{ inputs.context }}"
|
CONTEXT="${{ inputs.context }}"
|
||||||
;;
|
;;
|
||||||
|
"")
|
||||||
|
echo "⚠️ No context provided, using default directory."
|
||||||
|
CONTEXT="$GITHUB_WORKSPACE"
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
|
echo "🔧 Using relative context: ${{ inputs.context }}"
|
||||||
CONTEXT="$GITHUB_WORKSPACE/${{ inputs.context }}"
|
CONTEXT="$GITHUB_WORKSPACE/${{ inputs.context }}"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
else
|
|
||||||
CONTEXT="$GITHUB_WORKSPACE"
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Using context: $CONTEXT"
|
echo "Using context: $CONTEXT"
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue