This is an automated email from the ASF dual-hosted git repository.

adonisling pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/doris-thirdparty.git


The following commit(s) were added to refs/heads/main by this push:
     new fe3eb2f  [chore](github) Optimize the workflow Build (#14)
fe3eb2f is described below

commit fe3eb2f5db99e59b937628436c75327d739a443c
Author: Adonis Ling <[email protected]>
AuthorDate: Sun Nov 27 11:31:55 2022 +0800

    [chore](github) Optimize the workflow Build (#14)
    
    Display status in the release page.
---
 .github/workflows/build.yml | 32 ++++++++++++++++++++++++++------
 1 file changed, 26 insertions(+), 6 deletions(-)

diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index f2adb27..ef05ede 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -66,8 +66,8 @@ jobs:
             fi
           fi
 
-          if [[ -z "${last_version}" ]]; then
-            echo -ne "Update Time: *$(date)*\nDoris Version: 
*${current_version}*" >release_note.md
+          if "${should_release}"; then
+            echo -ne "Update Time: *$(date)*\nDoris Version: 
*${current_version}*\nStatus: *BUILDING*" >release_note.md
           else
             gh release view automation | sed -n '/--/,$p' | awk '{ if (NR > 1) 
print $0 }' | sed "{
               s/Update Time:.*/Update Time: *$(date)*/
@@ -157,7 +157,8 @@ jobs:
       - name: Download
         run: |
           cd thirdparty
-          gh release download automation
+          curl -L 
https://github.com/apache/doris-thirdparty/releases/download/automation/doris-thirdparty-source.tgz
 \
+            -o doris-thirdparty-source.tgz
           tar -zxvf doris-thirdparty-source.tgz
 
       - name: Prepare for ${{ matrix.config.os }}
@@ -194,8 +195,8 @@ jobs:
           tar -cf - installed | xz -z -T0 - 
>"doris-thirdparty-prebuilt-${kernel}-${arch}.tar.xz"
           gh release upload --clobber automation 
"doris-thirdparty-prebuilt-${kernel}-${arch}.tar.xz"
 
-  checksums:
-    name: Checksums
+  success:
+    name: Success
     needs: [prerelease, build]
     if: needs.prerelease.outputs.should_release == 'true'
     runs-on: ubuntu-latest
@@ -210,5 +211,24 @@ jobs:
           gh release download automation
 
           content="$(gh release view automation | sed -n '/Update 
Time:/,/Doris Version:/p')"
-          echo -ne "${content}\n\n## Checksums\n\`\`\`\n$(sha256sum 
*)\n\`\`\`" >release_note.md
+          echo -ne "${content}\nStatus: *SUCCESS*\n\n## 
Checksums\n\`\`\`\n$(sha256sum *)\n\`\`\`" >release_note.md
+          gh release edit -F release_note.md automation
+
+  failure:
+    name: Failure
+    needs: [build]
+    if: failure()
+    runs-on: ubuntu-latest
+    env:
+      GH_REPO: ${{ github.repository }}
+      GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+    permissions:
+      contents: write
+    steps:
+      - name: Update Checksums
+        run: |
+          gh release download automation
+
+          content="$(gh release view automation | sed -n '/Update 
Time:/,/Doris Version:/p')"
+          echo -ne "${content}\nStatus: *FAILURE*\n\n## 
Checksums\n\`\`\`\n$(sha256sum *)\n\`\`\`" >release_note.md
           gh release edit -F release_note.md automation


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to