Skip to content

Commit 7a66b01

Browse files
committed
Added Debug info
1 parent 1a055ee commit 7a66b01

1 file changed

Lines changed: 24 additions & 3 deletions

File tree

.github/workflows/docker-build-push.yml

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,35 @@ jobs:
3838
username: ${{ secrets.DOCKERHUB_USERNAME }}
3939
password: ${{ secrets.DOCKERHUB_TOKEN }}
4040

41-
# Debug step to verify workflow triggering
41+
# Enhanced debug information
4242
- name: Debug Info
4343
run: |
44+
echo "==== Build Context ===="
4445
echo "Event name: ${{ github.event_name }}"
4546
echo "Branch name: ${{ github.ref }}"
47+
echo "Commit SHA: ${{ github.sha }}"
48+
echo "Workflow: ${{ github.workflow }}"
49+
50+
echo "==== Repository Info ===="
51+
echo "Repository: ${{ github.repository }}"
52+
echo "Default branch: ${{ github.event.repository.default_branch }}"
53+
54+
echo "==== Commit Info ===="
4655
echo "Commit message: ${{ github.event.head_commit.message }}"
47-
echo "Changed files:"
48-
git diff --name-only ${{ github.event.before }} ${{ github.event.after }}
56+
echo "Committed by: ${{ github.event.head_commit.author.name }}"
57+
58+
echo "==== Changed Files ===="
59+
if git rev-parse --verify HEAD^1 >/dev/null 2>&1; then
60+
git diff --name-only HEAD^1 HEAD
61+
else
62+
echo "First commit or shallow clone - listing all files:"
63+
git ls-files
64+
fi
65+
66+
echo "==== Environment ===="
67+
echo "GITHUB_WORKSPACE: $GITHUB_WORKSPACE"
68+
echo "Current directory: $(pwd)"
69+
ls -la
4970
5071
- name: Set image tag
5172
run: |

0 commit comments

Comments
 (0)