Skip to content

refactor(router): add stricter check in define-router #4283

refactor(router): add stricter check in define-router

refactor(router): add stricter check in define-router #4283

Workflow file for this run

name: Canary CI
on:
issue_comment:
types: [created]
permissions:
contents: read
jobs:
parse-version:
if: |
github.event.issue.pull_request &&
startsWith(github.event.comment.body, '/canary-ci run') &&
contains(fromJSON('["OWNER","MEMBER","COLLABORATOR"]'), github.event.comment.author_association)
runs-on: ubuntu-latest
outputs:
react_version: ${{ steps.get-version.outputs.react_version }}
steps:
- name: Get React version from comment
id: get-version
env:
COMMENT_BODY: ${{ github.event.comment.body }}
run: |
comment="$COMMENT_BODY"
# Extract version after '/canary-ci run', defaulting to 'canary' if not specified
version=$(echo "$comment" | sed -n 's/^\/canary-ci run\s*\([A-Za-z0-9._@/+-]*\).*/\1/p')
if [ -z "$version" ]; then
version="canary"
fi
echo "react_version=$version" >> $GITHUB_OUTPUT
canary-ci-e2e:
needs: parse-version
uses: ./.github/workflows/e2e.yml
with:
ref: refs/pull/${{ github.event.issue.number }}/head
react_version: ${{ needs.parse-version.outputs.react_version }}
canary-ci-test:
needs: parse-version
uses: ./.github/workflows/test.yml
with:
ref: refs/pull/${{ github.event.issue.number }}/head
react_version: ${{ needs.parse-version.outputs.react_version }}