Skip to content

Commit

Permalink
fix(stage-build): trigger workflow from next on schedule
Browse files Browse the repository at this point in the history
Ensures that we use the workflow from the `next` branch.
  • Loading branch information
caugner committed Apr 16, 2024
1 parent e531d03 commit a1ff56d
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .github/workflows/stage-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,19 @@ permissions:
id-token: write

jobs:
trigger:
runs-on: ubuntu-latest
if: ${{ github.repository == 'mdn/yari' && github.event.schedule != '' }}
steps:
# The schedule runs the `main` version, but we want the `next` version.
- run: gh workflow run "${{ github.workflow }}" --ref "${{ env.DEFAULT_REF }}"

build:
environment: stage
runs-on: ubuntu-latest

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

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

0 comments on commit a1ff56d

Please sign in to comment.