mirror of
https://github.com/withastro/astro.git
synced 2025-03-10 23:01:26 -05:00
ci: trick changesets to use the correct ref (#13220)
Co-authored-by: ascorbic <213306+ascorbic@users.noreply.github.com>
This commit is contained in:
parent
8d68ac4b5c
commit
7d94b49870
1 changed files with 20 additions and 3 deletions
23
.github/workflows/preview-release.yml
vendored
23
.github/workflows/preview-release.yml
vendored
|
@ -37,9 +37,26 @@ jobs:
|
|||
steps:
|
||||
- name: Disable git crlf
|
||||
run: git config --global core.autocrlf false
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
|
||||
- name: resolve pr refs
|
||||
id: refs
|
||||
uses: eficode/resolve-pr-refs@main
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ steps.refs.outputs.head_ref }}
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Extract base branch from .changeset/config.json
|
||||
id: getBaseBranch
|
||||
run: |
|
||||
baseBranch=$(jq -r '.baseBranch' .changeset/config.json)
|
||||
echo "baseBranch=${baseBranch}" >> $GITHUB_OUTPUT
|
||||
|
||||
- run: git fetch origin ${{ steps.getBaseBranch.outputs.baseBranch }}:${{ steps.getBaseBranch.outputs.baseBranch }}
|
||||
|
||||
- name: Setup PNPM
|
||||
uses: pnpm/action-setup@v3
|
||||
|
|
Loading…
Add table
Reference in a new issue