From f13675e10cd59f4b7bea8904acef2d4f6c5f2835 Mon Sep 17 00:00:00 2001 From: Ryan Gang Date: Mon, 23 Dec 2024 14:11:44 +0530 Subject: [PATCH] ci: fetch origin head_ref before checkout in fixture regeneration workflow --- .github/workflows/fixtures.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/fixtures.yml b/.github/workflows/fixtures.yml index a7833f1..8a7a203 100644 --- a/.github/workflows/fixtures.yml +++ b/.github/workflows/fixtures.yml @@ -30,6 +30,7 @@ jobs: git config --global user.email "ryan-gg@outlook.com" git config --global user.name "Ryan Gang" git remote set-url origin https://ryan-gang:${{ secrets.GITHUB_TOKEN }}@github.com/codecrafters-io/shell-tester.git + git fetch origin ${{ github.head_ref }} git checkout ${{ github.head_ref }} git diff --quiet || (git add . && git commit -m "ci: add regenerated fixtures" && git push)