Skip to content

Commit 197a0b2

Browse files
authored
fix: Update dist-pr.yml (#191)
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.
1 parent b7444d0 commit 197a0b2

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

.github/workflows/dist-pr.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,11 @@ jobs:
2626
- name: Checkout code
2727
uses: actions/checkout@v3
2828
with:
29-
ref: ${{ github.event.before }} # Checkout previous commit on dist.
29+
ref: dist
3030
token: ${{ secrets.GH_MERGE_TOKEN }}
31+
32+
- name: Checkout Previous Commit
33+
run: git checkout ${{ github.event.before }}
3134

3235
- name: Create Pull Request
3336
uses: peter-evans/create-pull-request@v5
@@ -36,8 +39,8 @@ jobs:
3639
commit-message: 'chore: automated output update (dist)'
3740
title: 'chore: automated output update (dist)'
3841
body: 'This PR contains updated build output from the dist branch.'
39-
branch: 'dist-to-main-pr' # Use a dedicated PR branch
40-
base: main
42+
branch: 'dist-to-main-pr' # PR branch
43+
base: main # Target branch
4144
labels: |
4245
automated pr
4346
dist-update

0 commit comments

Comments
 (0)