Skip to content

Commit 7617c07

Browse files
committed
Allow phase 2 migration on pull request sync
1 parent 578e2d7 commit 7617c07

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

.github/workflows/settings-refactor-phase2.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
name: Settings refactor phase 2 migration
22

33
on:
4+
pull_request:
5+
branches:
6+
- master
7+
paths:
8+
- 'scripts/phase2_catalog_migration.py'
9+
- '.github/workflows/settings-refactor-phase2.yml'
410
push:
511
branches:
612
- agent/settings-refactor-phase1-safety
@@ -14,11 +20,12 @@ permissions:
1420

1521
jobs:
1622
migrate-catalog:
23+
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
1724
runs-on: ubuntu-latest
1825
steps:
1926
- uses: actions/checkout@v4
2027
with:
21-
ref: agent/settings-refactor-phase1-safety
28+
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.ref || github.ref_name }}
2229
fetch-depth: 1
2330
- uses: actions/setup-python@v5
2431
with:
@@ -40,4 +47,4 @@ jobs:
4047
git config user.email '41898282+github-actions[bot]@users.noreply.github.com'
4148
git add src/settings-catalog.json
4249
git commit -m 'Complete settings catalog coverage for phase 2'
43-
git push origin HEAD:agent/settings-refactor-phase1-safety
50+
git push origin HEAD:${{ github.event_name == 'pull_request' && github.event.pull_request.head.ref || github.ref_name }}

0 commit comments

Comments
 (0)