From 4e2beb59501bd3c22241f786292009a13b774c27 Mon Sep 17 00:00:00 2001 From: "envil a.k.a pow" Date: Mon, 19 Feb 2024 15:26:51 +0700 Subject: [PATCH] chore: update build workflow --- .github/workflows/build-openseries-web.yaml | 23 +++++++++++++-------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build-openseries-web.yaml b/.github/workflows/build-openseries-web.yaml index aee47c3..6b71320 100644 --- a/.github/workflows/build-openseries-web.yaml +++ b/.github/workflows/build-openseries-web.yaml @@ -34,22 +34,27 @@ jobs: exit 1 fi + comment: + needs: build + runs-on: ubuntu-latest + if: always() + steps: - name: Comment on Pull Request env: GH_TOKEN: ${{ secrets.WF_TOKEN }} PR: ${{ github.event.pull_request.html_url }} run: | LAST_COMMIT_SHA="${{ github.event.pull_request.head.sha }}" - if [[ ${{ job.status }} == 'success' ]]; then - BUILD_STATUS="Berhasil🩵" - LABEL="ready to review" - SUCCESS_MESSAGE="Mohon untuk menunggu para Maintainer mereview kodemu🎉!" - REMOVAL_LABEL="invalid" + if [[ ${{ job.status.build }} == 'success' ]]; then + BUILD_STATUS="Berhasil🩵" + LABEL="ready to review" + SUCCESS_MESSAGE="Mohon untuk menunggu para Maintainer mereview kodemu🎉!" + REMOVAL_LABEL="invalid" else - BUILD_STATUS="Gagal💔" - LABEL="invalid" - SUCCESS_MESSAGE="Sepertinya ada kesalahan dalam kode yang menyebabkan kegagalan build. Coba jalankan `bun run build` di localmu. Silahkan perbaiki terlebih dahulu😼!" - REMOVAL_LABEL="ready to review" + BUILD_STATUS="Gagal💔" + LABEL="invalid" + SUCCESS_MESSAGE="Sepertinya ada kesalahan dalam kode yang menyebabkan kegagalan build. Coba jalankan `bun run build` di localmu. Silahkan perbaiki terlebih dahulu😼!" + REMOVAL_LABEL="ready to review" fi COMMENT_BODY=$(cat <