diff --git a/.github/workflows/build-lxd.yml b/.github/workflows/build-lxd.yml
index 776c52c2f..a04bc2374 100644
--- a/.github/workflows/build-lxd.yml
+++ b/.github/workflows/build-lxd.yml
@@ -63,6 +63,14 @@ jobs:
       LXD_ARCH: "${{ inputs.arch || 'x86' }}"
       LXC: "${{ needs.determine-runner.outputs.lxc_cmd }}"
     steps:
+      - name: debug ref variables
+        run: |
+          set -x
+          echo "inputs.git_ref: ${{ inputs.git_ref }}"
+          echo "github.head_ref: ${{ github.head_ref }}"
+          echo "github.ref_name: ${{ github.ref_name }}"
+          echo "GITHUB_REF: ${GITHUB_REF}"
+          echo "GITHUB_HEAD_REF: ${GITHUB_HEAD_REF}"
       - name: Checkout code
         uses: actions/checkout@v4
         with: