0
Fork 0
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:
Emanuele Stoppa 2025-02-11 16:10:37 +00:00 committed by GitHub
parent 8d68ac4b5c
commit 7d94b49870
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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