Skip to content

Commit a1ff56d

Browse files
committed
fix(stage-build): trigger workflow from next on schedule
Ensures that we use the workflow from the `next` branch.
1 parent e531d03 commit a1ff56d

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

.github/workflows/stage-build.yml

+8-1
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,19 @@ permissions:
6565
id-token: write
6666

6767
jobs:
68+
trigger:
69+
runs-on: ubuntu-latest
70+
if: ${{ github.repository == 'mdn/yari' && github.event.schedule != '' }}
71+
steps:
72+
# The schedule runs the `main` version, but we want the `next` version.
73+
- run: gh workflow run "${{ github.workflow }}" --ref "${{ env.DEFAULT_REF }}"
74+
6875
build:
6976
environment: stage
7077
runs-on: ubuntu-latest
7178

7279
# Only run the scheduled workflows on the main repo.
73-
if: github.repository == 'mdn/yari'
80+
if: ${{ github.repository == 'mdn/yari' && github.event.schedule == '' }}
7481

7582
steps:
7683
# Our usecase is a bit complicated. When the cron schedule runs this workflow,

0 commit comments

Comments
 (0)