From 84f9fe763294c694b266921b9ba42f7d1beb9665 Mon Sep 17 00:00:00 2001 From: Akira Komamura Date: Sun, 24 Sep 2023 14:31:53 +0900 Subject: [PATCH] Detach the head to prevent from resetting --- .github/workflows/merge-upstream.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/merge-upstream.yml b/.github/workflows/merge-upstream.yml index 5226643012f..67b5856f981 100644 --- a/.github/workflows/merge-upstream.yml +++ b/.github/workflows/merge-upstream.yml @@ -38,6 +38,12 @@ jobs: nix run github:emacs-twist/recipes-updater/remain-on-tmp-branch#forceUpdate \ --no-write-lock-file -- upstream/master + # A workaround to prevent peter-evans/create-pull-request from resetting the + # head here: + # + - name: Detach the head + run: git switch --detach `git rev-parse HEAD` + - name: Create a pull request uses: peter-evans/create-pull-request@v5 with: