From dfab658040ea52792f5f2a0597bbbc82eaecb25c Mon Sep 17 00:00:00 2001 From: robojerk Date: Tue, 15 Jul 2025 08:41:01 -0700 Subject: [PATCH] Fix Forgejo workflow: handle detached HEAD state for git push --- .forgejo/workflows/compile-apt-layer.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.forgejo/workflows/compile-apt-layer.yml b/.forgejo/workflows/compile-apt-layer.yml index dab6d66..606c075 100644 --- a/.forgejo/workflows/compile-apt-layer.yml +++ b/.forgejo/workflows/compile-apt-layer.yml @@ -254,4 +254,5 @@ jobs: git config --local user.name "GitHub Action" git add apt-layer.sh install-apt-layer.sh git diff --staged --quiet || git commit -m "Auto-compile apt-layer and installer from commit ${{ github.sha }}" - git push \ No newline at end of file + # Push to the current branch (handle detached HEAD) + git push origin HEAD:${{ github.ref_name }} \ No newline at end of file