From 3824dc42de490acb225b93a30a04184dbd041d35 Mon Sep 17 00:00:00 2001 From: Hien To Date: Tue, 1 Oct 2024 13:48:24 +0700 Subject: [PATCH] fix: nightly version discord message hard to read on PC --- .github/workflows/nightly-build.yml | 2 +- .github/workflows/template-noti-discord.yaml | 30 +++++++++++--------- 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/.github/workflows/nightly-build.yml b/.github/workflows/nightly-build.yml index 1a40451e3..6f197f42c 100644 --- a/.github/workflows/nightly-build.yml +++ b/.github/workflows/nightly-build.yml @@ -124,7 +124,7 @@ jobs: AWS_EC2_METADATA_DISABLED: "true" noti-discord-nightly-and-update-url-readme: - needs: [build-macos-x64, build-macos-arm64, build-windows-x64, build-linux-x64, get-update-version, set-public-provider, get-cortex-llamacpp-latest-version] + needs: [build-macos-x64, build-macos-arm64, build-windows-x64, build-linux-x64, get-update-version, set-public-provider, get-cortex-llamacpp-latest-version, update-latest-version] secrets: inherit if: github.event_name == 'schedule' uses: ./.github/workflows/template-noti-discord.yaml diff --git a/.github/workflows/template-noti-discord.yaml b/.github/workflows/template-noti-discord.yaml index 3f715bebf..e1a7ecd7e 100644 --- a/.github/workflows/template-noti-discord.yaml +++ b/.github/workflows/template-noti-discord.yaml @@ -20,24 +20,26 @@ jobs: - name: Set version to environment variable run: | echo "VERSION=${{ inputs.new_version }}" >> $GITHUB_ENV + echo "RUNNER_ID=$GITHUB_RUN_ID" >> $GITHUB_ENV + echo "BUILD_REASON=${{ inputs.build_reason }}" >> $GITHUB_ENV - name: Notify Discord - uses: Ilshidur/action-discord@master + uses: appleboy/discord-action@v1.0.0 with: - args: | - Cortex.cpp ${{ inputs.build_reason }} build artifact version {{ VERSION }}: + webhook_id: ${{ secrets.WEBHOOK_ID }} + webhook_token: ${{ secrets.WEBHOOK_TOKEN }} + message: | + Cortex.cpp ${{ env.BUILD_REASON }} build artifact version ${{ env.VERSION }}: - Windows: - - Network Installer: https://delta.jan.ai/cortex/v{{ VERSION }}/windows-amd64/cortex-{{ VERSION }}-windows-amd64-network-installer.exe - - Local Installer: https://delta.jan.ai/cortex/v{{ VERSION }}/windows-amd64/cortex-{{ VERSION }}-windows-amd64-local-installer.exe + - Network Installer: https://delta.jan.ai/cortex/v${{ env.VERSION }}/windows-amd64/cortex-${{ env.VERSION }}-windows-amd64-network-installer.exe + - Local Installer: https://delta.jan.ai/cortex/v${{ env.VERSION }}/windows-amd64/cortex-${{ env.VERSION }}-windows-amd64-local-installer.exe - macOS Intel: - - Network Installer: https://delta.jan.ai/cortex/v{{ VERSION }}/mac-amd64/cortex-{{ VERSION }}-mac-amd64-network-installer.pkg - - Local Installer: https://delta.jan.ai/cortex/v{{ VERSION }}/mac-amd64/cortex-{{ VERSION }}-mac-amd64-local-installer.pkg + - Network Installer: https://delta.jan.ai/cortex/v${{ env.VERSION }}/mac-amd64/cortex-${{ env.VERSION }}-mac-amd64-network-installer.pkg + - Local Installer: https://delta.jan.ai/cortex/v${{ env.VERSION }}/mac-amd64/cortex-${{ env.VERSION }}-mac-amd64-local-installer.pkg - macOS Apple Silicon: - - Network Installer: https://delta.jan.ai/cortex/v{{ VERSION }}/mac-arm64/cortex-{{ VERSION }}-mac-arm64-network-installer.pkg - - Local Installer: https://delta.jan.ai/cortex/v{{ VERSION }}/mac-arm64/cortex-{{ VERSION }}-mac-arm64-local-installer.pkg + - Network Installer: https://delta.jan.ai/cortex/v${{ env.VERSION }}/mac-arm64/cortex-${{ env.VERSION }}-mac-arm64-network-installer.pkg + - Local Installer: https://delta.jan.ai/cortex/v${{ env.VERSION }}/mac-arm64/cortex-${{ env.VERSION }}-mac-arm64-local-installer.pkg - Linux Deb: - - Network Installer: https://delta.jan.ai/cortex/v{{ VERSION }}/linux-amd64/cortex-{{ VERSION }}-linux-amd64-network-installer.deb - - Local Installer: https://delta.jan.ai/cortex/v{{ VERSION }}/linux-amd64/cortex-{{ VERSION }}-linux-amd64-local-installer.deb - - Github action run: https://github.com/janhq/cortex.cpp/actions/runs/{{ GITHUB_RUN_ID }} - env: - DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} \ No newline at end of file + - Network Installer: https://delta.jan.ai/cortex/v${{ env.VERSION }}/linux-amd64/cortex-${{ env.VERSION }}-linux-amd64-network-installer.deb + - Local Installer: https://delta.jan.ai/cortex/v${{ env.VERSION }}/linux-amd64/cortex-${{ env.VERSION }}-linux-amd64-local-installer.deb + - Github action run: https://github.com/janhq/cortex.cpp/actions/runs/${{ env.RUNNER_ID }}