1name: Code Review 2 3on: 4 workflow_dispatch: 5 inputs: 6 pullNumber: 7 description: 'Number of the pull request to review' 8 required: true 9 pull_request_target: 10 branches: [main, sdk-*] 11 12concurrency: 13 group: ${{ github.workflow }}-${{ github.event.inputs.pullNumber || github.event.number }} 14 cancel-in-progress: true 15 16jobs: 17 code_review: 18 runs-on: ubuntu-22.04 19 timeout-minutes: 30 20 steps: 21 - name: Checkout 22 uses: actions/checkout@v3 23 - name: ➕ Add `bin` to GITHUB_PATH 24 run: echo "$(pwd)/bin" >> $GITHUB_PATH 25 - name: ♻️ Restore caches 26 uses: ./.github/actions/expo-caches 27 with: 28 yarn-tools: 'true' 29 30 ### This job is run on Ubuntu which doesn't have SwiftLint installed, so we need to build it from sources. 31 ### Building it on each run may take too much time, so we bundle the binary in `@expo/swiftlint` package. 32 ### To update SwiftLint, uncomment steps below, download the artifact and update that package. 33 # - name: Build and install SwiftLint 34 # run: | 35 # git clone https://github.com/realm/SwiftLint.git --branch 0.52.2 --depth 1 36 # cd SwiftLint 37 # swift build -c release 38 # cp .build/release/swiftlint /usr/local/bin/ 39 # - name: Make an artifact 40 # uses: actions/upload-artifact@v2 41 # with: 42 # name: swiftlint 43 # path: SwiftLint/.build 44 45 - name: Reviewing a pull request 46 run: expotools code-review --pr ${{ github.event.inputs.pullNumber || github.event.number }} 47 env: 48 GITHUB_TOKEN: ${{ secrets.EXPO_BOT_GITHUB_TOKEN }} 49