From 3aa6073ed74efbd110b68a18fcf3518ac29e6040 Mon Sep 17 00:00:00 2001 From: Thisaru Guruge Date: Tue, 19 Sep 2023 15:26:30 +0530 Subject: [PATCH] Add setup Java step --- .github/workflows/pull-request.yml | 10 +++++----- examples/drafts/update_draft.bal | 2 +- examples/messages/send_html_message.bal | 2 +- examples/messages/send_text_message.bal | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 6987f3d0..7743911d 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -23,14 +23,14 @@ jobs: java-version: 17.0.7 - name: Gradle Build without Tests - if: ${{ env.OWNER != "ballerina-platform" }} + if: ${{ env.OWNER }} != "ballerina-platform" run: ./gradlew build -x test env: packageUser: ${{ github.actor }} packagePAT: ${{ secrets.GITHUB_TOKEN }} - name: Gradle Build - if: ${{ env.OWNER == "ballerina-platform" }} + if: ${{ env.OWNER }} == "ballerina-platform" run: ./gradlew build env: JAVA_OPTS: -DBALLERINA_DEV_COMPILE_BALLERINA_ORG=true @@ -70,14 +70,14 @@ jobs: java-version: 17.0.7 - name: Gradle Build without Tests - if: ${{ env.OWNER != "ballerina-platform" }} - run: ./gradlew build -x test && echo ${{ env.OWNER }} + if: ${{ env.OWNER }} != "ballerina-platform" + run: ./gradlew build -x test env: packageUser: ${{ github.actor }} packagePAT: ${{ secrets.GITHUB_TOKEN }} - name: Gradle Build - if: ${{ env.OWNER == "ballerina-platform" }} + if: ${{ env.OWNER }} == "ballerina-platform" run: ./gradlew build env: JAVA_OPTS: -DBALLERINA_DEV_COMPILE_BALLERINA_ORG=true diff --git a/examples/drafts/update_draft.bal b/examples/drafts/update_draft.bal index 3535b7bd..8837f39c 100644 --- a/examples/drafts/update_draft.bal +++ b/examples/drafts/update_draft.bal @@ -45,7 +45,7 @@ public function main() returns error? { contentType: gmail:TEXT_PLAIN }; - string testAttachmentPath = "../resources/test_document.txt"; + string testAttachmentPath = "../examples/resources/test_document.txt"; string attachmentContentType = "text/plain"; gmail:AttachmentPath[] attachments = [{attachmentPath: testAttachmentPath, mimeType: attachmentContentType}]; diff --git a/examples/messages/send_html_message.bal b/examples/messages/send_html_message.bal index d1e85185..0fcea2a9 100644 --- a/examples/messages/send_html_message.bal +++ b/examples/messages/send_html_message.bal @@ -47,7 +47,7 @@ public function main() returns error? { string inlineImagePath = "../resources/test_image.png"; string imageContentType = "image/png"; - string testAttachmentPath = "../resources/test_document.txt"; + string testAttachmentPath = "../examples/resources/test_document.txt"; string attachmentContentType = "text/plain"; // Set Inline Images if exists diff --git a/examples/messages/send_text_message.bal b/examples/messages/send_text_message.bal index 56141197..3e19abc2 100644 --- a/examples/messages/send_text_message.bal +++ b/examples/messages/send_text_message.bal @@ -43,7 +43,7 @@ public function main() returns error? { contentType: gmail:TEXT_PLAIN }; - string testAttachmentPath = "../resources/test_document.txt"; + string testAttachmentPath = "../examples/resources/test_document.txt"; string attachmentContentType = "text/plain"; // Set Attachments if exists