fix(ci): pull in the upstream base repo branch for PRs
This commit is contained in:
@@ -34,6 +34,13 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
||||||
ref: ${{ github.event.pull_request.head.ref }}
|
ref: ${{ github.event.pull_request.head.ref }}
|
||||||
|
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: Check out repository code
|
- name: Check out repository code
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v6
|
||||||
|
|||||||
@@ -38,6 +38,13 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
||||||
ref: ${{ github.event.pull_request.head.ref }}
|
ref: ${{ github.event.pull_request.head.ref }}
|
||||||
|
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: Check out repository code
|
- name: Check out repository code
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v6
|
||||||
|
|||||||
@@ -60,6 +60,13 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
ref: ${{ github.event.pull_request.head.ref }}
|
ref: ${{ github.event.pull_request.head.ref }}
|
||||||
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
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
|
- name: Get changed files
|
||||||
id: changed-files-yaml
|
id: changed-files-yaml
|
||||||
@@ -80,9 +87,9 @@ jobs:
|
|||||||
- name: Publish to Chromatic
|
- name: Publish to Chromatic
|
||||||
if: ${{ github.actor != 'renovate[bot]' && github.actor != 'renovate' && steps.changed-files-yaml.outputs.src_any_changed == 'true' }}
|
if: ${{ github.actor != 'renovate[bot]' && github.actor != 'renovate' && steps.changed-files-yaml.outputs.src_any_changed == 'true' }}
|
||||||
uses: chromaui/action@v13
|
uses: chromaui/action@v13
|
||||||
|
|
||||||
# Chromatic GitHub Action options
|
|
||||||
with:
|
with:
|
||||||
workingDir: web
|
workingDir: web
|
||||||
projectToken: f47410569b62
|
projectToken: f47410569b62
|
||||||
onlyChanged: true
|
onlyChanged: true
|
||||||
|
branch: ${{ github.head_ref || github.ref_name }}
|
||||||
|
sha: ${{ github.event.pull_request.head.sha || github.sha }}
|
||||||
|
|||||||
@@ -30,6 +30,13 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
||||||
ref: ${{ github.event.pull_request.head.ref }}
|
ref: ${{ github.event.pull_request.head.ref }}
|
||||||
|
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: Check out repository code
|
- name: Check out repository code
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v6
|
||||||
|
|||||||
@@ -47,6 +47,13 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
||||||
ref: ${{ github.event.pull_request.head.ref }}
|
ref: ${{ github.event.pull_request.head.ref }}
|
||||||
|
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: Check out repository code
|
- name: Check out repository code
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v6
|
||||||
|
|||||||
@@ -57,6 +57,13 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
||||||
ref: ${{ github.event.pull_request.head.ref }}
|
ref: ${{ github.event.pull_request.head.ref }}
|
||||||
|
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: Setup Nodejs
|
- name: Setup Nodejs
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
@@ -145,6 +152,13 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
||||||
ref: ${{ github.event.pull_request.head.ref }}
|
ref: ${{ github.event.pull_request.head.ref }}
|
||||||
|
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: Check out repository code
|
- name: Check out repository code
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v6
|
||||||
|
|||||||
Reference in New Issue
Block a user