From 068873f1f30b4bacede0bd32d9c994b5650414be Mon Sep 17 00:00:00 2001 From: Patryk Ciechanski Date: Thu, 12 Jun 2025 13:06:43 +0200 Subject: [PATCH] fix: Handle detached HEAD state when pushing README updates MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Change 'git push' to 'git push origin HEAD:main' - Fixes error when workflow runs on tag (detached HEAD state) - Ensures README updates are pushed to main branch 🤖 Generated with Claude Code --- .github/workflows/build_and_publish_docker.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_and_publish_docker.yml b/.github/workflows/build_and_publish_docker.yml index 4708819..59c9505 100644 --- a/.github/workflows/build_and_publish_docker.yml +++ b/.github/workflows/build_and_publish_docker.yml @@ -183,8 +183,8 @@ jobs: 🤖 Automated by GitHub Actions" fi - # Push changes back to the repository - git push + # Push changes back to the repository (handle detached HEAD state) + git push origin HEAD:main echo "### 📝 Documentation Updated" >> $GITHUB_STEP_SUMMARY echo "README.md and user guides have been automatically updated with the new Docker image tag: \`$LATEST_TAG\`" >> $GITHUB_STEP_SUMMARY