[pull] main from expo:main #5106
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Code Review | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| pullNumber: | |
| description: 'Number of the pull request to review' | |
| required: true | |
| pull_request: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.inputs.pullNumber || github.event.number }} | |
| cancel-in-progress: true | |
| jobs: | |
| code_review: | |
| # Auto-run only on same-repo PRs to expo/expo. Fork PRs don't get | |
| # EXPO_BOT_GITHUB_TOKEN under `pull_request`, so the review would fail | |
| # anyway — skip cleanly instead of leaving a red check. Forks dispatching | |
| # this workflow manually would also fail for the same reason; gate on | |
| # `github.repository` to short-circuit. | |
| if: >- | |
| github.repository == 'expo/expo' && | |
| (github.event_name == 'workflow_dispatch' || | |
| github.event.pull_request.head.repo.full_name == github.repository) | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 30 | |
| steps: | |
| - name: 👀 Checkout | |
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| - name: 🔨 Install pnpm | |
| uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4 | |
| with: | |
| version: 10 | |
| - name: ⬢ Setup Node | |
| uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 | |
| with: | |
| node-version: 22 | |
| cache: 'pnpm' | |
| - name: ➕ Add `bin` to GITHUB_PATH | |
| run: echo "$(pwd)/bin" >> $GITHUB_PATH | |
| - name: 📦 Install dependencies | |
| run: pnpm install --ignore-scripts --frozen-lockfile | |
| - name: ♻️ Restore caches | |
| uses: ./.github/actions/expo-caches | |
| ### This job is run on Ubuntu which doesn't have SwiftLint installed, so we need to build it from sources. | |
| ### Building it on each run may take too much time, so we bundle the binary in `@expo/swiftlint` package. | |
| ### To update SwiftLint, uncomment steps below, download the artifact and update that package. | |
| # - name: 👷 Build and install SwiftLint | |
| # run: | | |
| # git clone https://github.com/realm/SwiftLint.git --branch 0.57.0 --depth 1 | |
| # cd SwiftLint | |
| # swift build -c release | |
| # cp .build/release/swiftlint /usr/local/bin/ | |
| # - name: 📦 Make an artifact | |
| # uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 | |
| # with: | |
| # name: swiftlint | |
| # path: SwiftLint/.build | |
| # include-hidden-files: true | |
| - name: 🔬 Reviewing a pull request | |
| run: pnpm expotools code-review --pr ${{ github.event.inputs.pullNumber || github.event.number }} | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.EXPO_BOT_GITHUB_TOKEN }} |