From 15671b74163b9490fc7f6ddae2a9f44c91a9824e Mon Sep 17 00:00:00 2001 From: belljun3395 <195850@jnu.ac.kr> Date: Wed, 24 Jul 2024 03:37:07 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20sql-explain-hook=20=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/sql-explain-hook.yml | 40 ++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/sql-explain-hook.yml diff --git a/.github/workflows/sql-explain-hook.yml b/.github/workflows/sql-explain-hook.yml new file mode 100644 index 000000000..75a5c307d --- /dev/null +++ b/.github/workflows/sql-explain-hook.yml @@ -0,0 +1,40 @@ +name: Sql Explain Hook + +on: + pull_request: + branches: ["main"] + workflow_dispatch: + +env: + DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} + +jobs: + sql-explain-hook: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Set up JDK 17 + uses: actions/setup-java@v3 + with: + java-version: "17" + distribution: "temurin" + + - name: Jooq Code Generation + run: | + ./gradlew --info jooqCodegenAll + + - name: Test with Gradle + run: | + ./gradlew --info api-repo:generateExplainDocs + + - name: Zip Explain Docs + run: | + zip -r explain-docs.zip api-repo/test/resources/explain/* + mv explain-docs.zip $GITHUB_WORKSPACE + + - name: Upload Explain Docs + run: | + curl \ + -F 'payload_json={"username": "GitHubAction", "content": "SqlExplainHook - PR: ${GITHUB_REF}, Commit: ${GITHUB_SHA}"}' \ + -F "file1=@$GITHUB_WORKSPACE/explain-docs.zip" \ + $DISCORD_WEBHOOK