From 60bef6500f7e3fadbb9b58279dbcdbe1299739d3 Mon Sep 17 00:00:00 2001 From: William French Date: Wed, 26 Feb 2025 10:33:08 -0800 Subject: [PATCH] fix: Update dist-pr.yml Updates dist-pr workflow as follows: - Adds ref: dist to explicitly checkout the dist branch (avoid the detached head state so popular in medieval days) - Add a step to checkout the previous commit, so that the CPR action has something to compare against. --- .github/workflows/dist-pr.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/dist-pr.yml b/.github/workflows/dist-pr.yml index 93e53152..7b09a617 100644 --- a/.github/workflows/dist-pr.yml +++ b/.github/workflows/dist-pr.yml @@ -26,8 +26,11 @@ jobs: - name: Checkout code uses: actions/checkout@v3 with: - ref: ${{ github.event.before }} # Checkout previous commit on dist. + ref: dist token: ${{ secrets.GH_MERGE_TOKEN }} + + - name: Checkout Previous Commit + run: git checkout ${{ github.event.before }} - name: Create Pull Request uses: peter-evans/create-pull-request@v5 @@ -36,8 +39,8 @@ jobs: commit-message: 'chore: automated output update (dist)' title: 'chore: automated output update (dist)' body: 'This PR contains updated build output from the dist branch.' - branch: 'dist-to-main-pr' # Use a dedicated PR branch - base: main + branch: 'dist-to-main-pr' # PR branch + base: main # Target branch labels: | automated pr dist-update