Scenario/pr boundary expand #2
Workflow file for this run
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: PR Gate | |
| on: | |
| pull_request: | |
| jobs: | |
| pr-gate: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout demo | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Fetch base branch ref | |
| run: | | |
| git fetch --no-tags --prune --depth=1 origin \ | |
| +refs/heads/${{ github.base_ref }}:refs/remotes/origin/${{ github.base_ref }} | |
| - name: Checkout bear-cli | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: ${{ github.repository_owner }}/bear-cli | |
| path: bear-cli | |
| - name: Setup Java | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: '21' | |
| - name: Build and install bear-cli | |
| working-directory: bear-cli | |
| run: | | |
| ./gradlew :app:installDist | |
| INSTALL_DIR=$(find /tmp -type d -path '*/bear-cli-build/*/app/install/bear' | sort | tail -n 1) | |
| if [[ -z "${INSTALL_DIR}" ]]; then | |
| echo "unable to locate installDist output" >&2 | |
| exit 1 | |
| fi | |
| mkdir -p "${GITHUB_WORKSPACE}/.bear/tools" | |
| rm -rf "${GITHUB_WORKSPACE}/.bear/tools/bear-cli" | |
| cp -R "${INSTALL_DIR}" "${GITHUB_WORKSPACE}/.bear/tools/bear-cli" | |
| - name: Run PR gate | |
| run: | | |
| set +e | |
| bash ./bin/pr-gate.sh "origin/${{ github.base_ref }}" 2>&1 | tee pr-gate.log | |
| code=${PIPESTATUS[0]} | |
| set -e | |
| grep -E '^(pr-delta:|pr-check:)' pr-gate.log >> "$GITHUB_STEP_SUMMARY" || true | |
| exit $code | |