Skip to content

Commit 68bed4c

Browse files
ci: ensure backend update PRs trigger CI (#1158)
Co-authored-by: MilesCranmerBot <milescranmerbot@users.noreply.github.com> Co-authored-by: Miles Cranmer <miles.cranmer@gmail.com>
1 parent d303728 commit 68bed4c

4 files changed

Lines changed: 23 additions & 0 deletions

File tree

.github/workflows/CI.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ on:
1414
paths:
1515
- '**'
1616

17+
workflow_dispatch:
18+
1719
permissions:
1820
contents: write
1921

.github/workflows/CI_Windows.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ on:
1414
paths:
1515
- '**'
1616

17+
workflow_dispatch:
18+
1719
jobs:
1820
test:
1921
runs-on: ${{ matrix.os }}

.github/workflows/CI_mac.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ on:
1414
paths:
1515
- '**'
1616

17+
workflow_dispatch:
18+
1719
jobs:
1820
test:
1921
runs-on: ${{ matrix.os }}

.github/workflows/update_backend.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@ on:
33
schedule:
44
- cron: '00 00 * * *'
55
workflow_dispatch:
6+
7+
permissions:
8+
contents: write
9+
pull-requests: write
10+
actions: write
11+
612
jobs:
713
update_compat:
814
runs-on: ubuntu-latest
@@ -38,6 +44,7 @@ jobs:
3844
fi
3945
4046
- name: "Create PR if necessary"
47+
id: cpr
4148
uses: peter-evans/create-pull-request@v8
4249
with:
4350
branch: backend-update/v${{ steps.get-latest.outputs.version }}
@@ -51,3 +58,13 @@ jobs:
5158
add-paths: |
5259
pyproject.toml
5360
pysr/juliapkg.json
61+
62+
- name: "Trigger CI workflows (backend update PR)"
63+
if: steps.cpr.outputs.pull-request-number != ''
64+
env:
65+
GH_TOKEN: ${{ github.token }}
66+
run: |
67+
ref="backend-update/v${{ steps.get-latest.outputs.version }}"
68+
gh workflow run "Linux" --repo "$GITHUB_REPOSITORY" --ref "$ref" || true
69+
gh workflow run "macOS" --repo "$GITHUB_REPOSITORY" --ref "$ref" || true
70+
gh workflow run "Windows" --repo "$GITHUB_REPOSITORY" --ref "$ref" || true

0 commit comments

Comments
 (0)