From d70e9f6467e9ced763cd57ad83e8474f587fc83c Mon Sep 17 00:00:00 2001 From: Corneil du Plessis Date: Thu, 19 Jan 2023 10:30:33 +0200 Subject: [PATCH] Fix PR workflow. --- .github/workflows/ci-pr.yml | 31 ++++++++++++------------------- 1 file changed, 12 insertions(+), 19 deletions(-) diff --git a/.github/workflows/ci-pr.yml b/.github/workflows/ci-pr.yml index e65bda3d..38f4a125 100644 --- a/.github/workflows/ci-pr.yml +++ b/.github/workflows/ci-pr.yml @@ -13,7 +13,7 @@ jobs: check: runs-on: 'stream-ci-large' steps: - - name: 'Configure: checkout stream-applications@${{ github.ref }}' + - name: 'Configure: checkout stream-applications@${{ github.ref_name }}' uses: actions/checkout@v3 - name: 'Configure: checkout stream-applications@main' id: checkout-main @@ -55,22 +55,13 @@ jobs: env: VERBOSE: ${{ github.debug && 'true' || '' }} run: | + PR=$(echo "${{ github.ref_name }}" | grep -o '[[:digit:]]*') + echo "Checking out pull request #$PR" + gh pr checkout $PR BUILD_DIR=$(realpath $MAIN_PATH) - echo "::notice ::building - stream-applications-build" + echo "::notice ::building - stream-applications - core" set +e - $BUILD_DIR/build-folder.sh stream-applications-build install -DskipTests - RC=$? - if ((RC!=0)); then - exit $RC - fi - echo "::notice ::building - functions" - $BUILD_DIR/build-folder.sh functions install -DskipTests - RC=$? - if ((RC!=0)); then - exit $RC - fi - echo "::notice ::building - stream-applications-core" - $BUILD_DIR/build-folder.sh applications/stream-applications-core install -DskipTests + $BUILD_DIR/build-folder.sh stream-applications-build,functions/common,functions/spring-functions-parent,applications/stream-applications-core install -DskipTests RC=$? if ((RC!=0)); then exit $RC @@ -98,10 +89,12 @@ jobs: done echo "::info ::verify $FOLDERS" set +e - $BUILD_DIR/build-folder.sh $FOLDERS install verify -amd - RC=$? - if ((RC!=0)); then - exit $RC + if [ "$FOLDERS" != "" ]; then + $BUILD_DIR/build-folder.sh $FOLDERS install verify -amd + RC=$? + if ((RC!=0)); then + exit $RC + fi fi - name: 'Upload: Error logs' if: ${{ failure() }}