fix(ci): pull in the upstream base repo branch for PRs

This commit is contained in:
Gabe Kangas
2026-01-02 19:54:17 -08:00
parent a278c3bb0a
commit ee3a0d486f
6 changed files with 52 additions and 3 deletions
+9 -2
View File
@@ -60,6 +60,13 @@ jobs:
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
fetch-depth: 0
- name: Fetch base branch for comparison
if: github.event_name == 'pull_request'
run: |
git remote add upstream https://github.com/${{ github.event.pull_request.base.repo.full_name }}.git || true
git fetch upstream ${{ github.event.pull_request.base.ref }}
- name: Get changed files
id: changed-files-yaml
@@ -80,9 +87,9 @@ jobs:
- name: Publish to Chromatic
if: ${{ github.actor != 'renovate[bot]' && github.actor != 'renovate' && steps.changed-files-yaml.outputs.src_any_changed == 'true' }}
uses: chromaui/action@v13
# Chromatic GitHub Action options
with:
workingDir: web
projectToken: f47410569b62
onlyChanged: true
branch: ${{ github.head_ref || github.ref_name }}
sha: ${{ github.event.pull_request.head.sha || github.sha }}