diff --git a/.github/workflows/push_checks_windows.yml b/.github/workflows/push_checks_windows.yml index 54600d8..ed878d7 100644 --- a/.github/workflows/push_checks_windows.yml +++ b/.github/workflows/push_checks_windows.yml @@ -50,45 +50,38 @@ jobs: - name: Handle job completion if: always() - shell: cmd - env: - CHAT_ID: ${{ secrets.CHAT_ID }} - CHAT_KEY: ${{ secrets.CHAT_KEY }} - REPO: ${{ github.repository }} - VERSION: ${{ env.VERSION }} - JOB_STATUS: ${{ job.status }} run: | - if "%JOB_STATUS%" == "failure" ( - landa-messenger-api chat-send ^ - --id "%CHAT_ID%" ^ - --api_key "%CHAT_KEY%" ^ - --title "🔴 Analyze - Windows Failed" ^ - --body "%REPO%: v%VERSION%" ^ - --url "https://github.com/landamessenger/zstandard/actions/workflows/tag_version_and_publish.yml" ^ - --image "https://avatars.githubusercontent.com/u/63705403?s=200&v=4" ^ - --background_color "#55000000" ^ + if [ "${{ job.status }}" == "failure" ]; then + landa-messenger-api chat-send \ + --id "${{ secrets.CHAT_ID }}" \ + --api_key "${{ secrets.CHAT_KEY }}" \ + --title "🔴 Analyze - Windows Failed" \ + --body "${{ github.repository }}: v${{ env.VERSION }}" \ + --url "https://github.com/landamessenger/zstandard/actions/workflows/tag_version_and_publish.yml" \ + --image "https://avatars.githubusercontent.com/u/63705403?s=200&v=4" \ + --background_color "#55000000" \ --text_color "#FFFFFFFF" - ) else if "%JOB_STATUS%" == "cancelled" ( - landa-messenger-api chat-send ^ - --id "%CHAT_ID%" ^ - --api_key "%CHAT_KEY%" ^ - --title "🟠 Analyze - Windows Canceled" ^ - --body "%REPO%: v%VERSION%" ^ - --url "https://github.com/landamessenger/zstandard/actions/workflows/tag_version_and_publish.yml" ^ - --image "https://avatars.githubusercontent.com/u/63705403?s=200&v=4" ^ - --background_color "#55000000" ^ + elif [ "${{ job.status }}" == "cancelled" ]; then + landa-messenger-api chat-send \ + --id "${{ secrets.CHAT_ID }}" \ + --api_key "${{ secrets.CHAT_KEY }}" \ + --title "🟠 Analyze - Windows Canceled" \ + --body "${{ github.repository }}: v${{ env.VERSION }}" \ + --url "https://github.com/landamessenger/zstandard/actions/workflows/tag_version_and_publish.yml" \ + --image "https://avatars.githubusercontent.com/u/63705403?s=200&v=4" \ + --background_color "#55000000" \ --text_color "#FFFFFFFF" - ) else ( - landa-messenger-api chat-send ^ - --id "%CHAT_ID%" ^ - --api_key "%CHAT_KEY%" ^ - --title "🟢 Analyze - Windows Passed" ^ - --body "%REPO%: v%VERSION%" ^ - --url "https://github.com/landamessenger/zstandard/actions/workflows/tag_version_and_publish.yml" ^ - --image "https://avatars.githubusercontent.com/u/63705403?s=200&v=4" ^ - --background_color "#55000000" ^ + else + landa-messenger-api chat-send \ + --id "${{ secrets.CHAT_ID }}" \ + --api_key "${{ secrets.CHAT_KEY }}" \ + --title "🟢 Analyze - Windows Passed" \ + --body "${{ github.repository }}: v${{ env.VERSION }}" \ + --url "https://github.com/landamessenger/zstandard/actions/workflows/tag_version_and_publish.yml" \ + --image "https://avatars.githubusercontent.com/u/63705403?s=200&v=4" \ + --background_color "#55000000" \ --text_color "#FFFFFFFF" - ) + fi check_windows_test: name: Test Windows runs-on: [self-hosted, Windows] @@ -124,45 +117,39 @@ jobs: - name: Handle job completion if: always() - shell: cmd - env: - CHAT_ID: ${{ secrets.CHAT_ID }} - CHAT_KEY: ${{ secrets.CHAT_KEY }} - REPO: ${{ github.repository }} - VERSION: ${{ env.VERSION }} - JOB_STATUS: ${{ job.status }} run: | - if "%JOB_STATUS%" == "failure" ( - landa-messenger-api chat-send ^ - --id "%CHAT_ID%" ^ - --api_key "%CHAT_KEY%" ^ - --title "🔴 Test - Windows Failed" ^ - --body "%REPO%: v%VERSION%" ^ - --url "https://github.com/landamessenger/zstandard/actions/workflows/tag_version_and_publish.yml" ^ - --image "https://avatars.githubusercontent.com/u/63705403?s=200&v=4" ^ - --background_color "#55000000" ^ + if [ "${{ job.status }}" == "failure" ]; then + landa-messenger-api chat-send \ + --id "${{ secrets.CHAT_ID }}" \ + --api_key "${{ secrets.CHAT_KEY }}" \ + --title "🔴 Test - Windows Failed" \ + --body "${{ github.repository }}: v${{ env.VERSION }}" \ + --url "https://github.com/landamessenger/zstandard/actions/workflows/tag_version_and_publish.yml" \ + --image "https://avatars.githubusercontent.com/u/63705403?s=200&v=4" \ + --background_color "#55000000" \ --text_color "#FFFFFFFF" - ) else if "%JOB_STATUS%" == "cancelled" ( - landa-messenger-api chat-send ^ - --id "%CHAT_ID%" ^ - --api_key "%CHAT_KEY%" ^ - --title "🟠 Test - Windows Canceled" ^ - --body "%REPO%: v%VERSION%" ^ - --url "https://github.com/landamessenger/zstandard/actions/workflows/tag_version_and_publish.yml" ^ - --image "https://avatars.githubusercontent.com/u/63705403?s=200&v=4" ^ - --background_color "#55000000" ^ + elif [ "${{ job.status }}" == "cancelled" ]; then + landa-messenger-api chat-send \ + --id "${{ secrets.CHAT_ID }}" \ + --api_key "${{ secrets.CHAT_KEY }}" \ + --title "🟠 Test - Windows Canceled" \ + --body "${{ github.repository }}: v${{ env.VERSION }}" \ + --url "https://github.com/landamessenger/zstandard/actions/workflows/tag_version_and_publish.yml" \ + --image "https://avatars.githubusercontent.com/u/63705403?s=200&v=4" \ + --background_color "#55000000" \ --text_color "#FFFFFFFF" - ) else ( - landa-messenger-api chat-send ^ - --id "%CHAT_ID%" ^ - --api_key "%CHAT_KEY%" ^ - --title "🟢 Test - Windows Passed" ^ - --body "%REPO%: v%VERSION%" ^ - --url "https://github.com/landamessenger/zstandard/actions/workflows/tag_version_and_publish.yml" ^ - --image "https://avatars.githubusercontent.com/u/63705403?s=200&v=4" ^ - --background_color "#55000000" ^ + else + landa-messenger-api chat-send \ + --id "${{ secrets.CHAT_ID }}" \ + --api_key "${{ secrets.CHAT_KEY }}" \ + --title "🟢 Test - Windows Passed" \ + --body "${{ github.repository }}: v${{ env.VERSION }}" \ + --url "https://github.com/landamessenger/zstandard/actions/workflows/tag_version_and_publish.yml" \ + --image "https://avatars.githubusercontent.com/u/63705403?s=200&v=4" \ + --background_color "#55000000" \ --text_color "#FFFFFFFF" - ) + fi + check_windows_publish_dry_run: name: Dry Run Publish Windows runs-on: [self-hosted, Windows] @@ -198,42 +185,35 @@ jobs: - name: Handle job completion if: always() - shell: cmd - env: - CHAT_ID: ${{ secrets.CHAT_ID }} - CHAT_KEY: ${{ secrets.CHAT_KEY }} - REPO: ${{ github.repository }} - VERSION: ${{ env.VERSION }} - JOB_STATUS: ${{ job.status }} run: | - if "%JOB_STATUS%" == "failure" ( - landa-messenger-api chat-send ^ - --id "%CHAT_ID%" ^ - --api_key "%CHAT_KEY%" ^ - --title "🔴 Dry Run Publish - Windows Failed" ^ - --body "%REPO%: v%VERSION%" ^ - --url "https://github.com/landamessenger/zstandard/actions/workflows/tag_version_and_publish.yml" ^ - --image "https://avatars.githubusercontent.com/u/63705403?s=200&v=4" ^ - --background_color "#55000000" ^ + if [ "${{ job.status }}" == "failure" ]; then + landa-messenger-api chat-send \ + --id "${{ secrets.CHAT_ID }}" \ + --api_key "${{ secrets.CHAT_KEY }}" \ + --title "🔴 Dry Run Publish - Windows Failed" \ + --body "${{ github.repository }}: v${{ env.VERSION }}" \ + --url "https://github.com/landamessenger/zstandard/actions/workflows/tag_version_and_publish.yml" \ + --image "https://avatars.githubusercontent.com/u/63705403?s=200&v=4" \ + --background_color "#55000000" \ --text_color "#FFFFFFFF" - ) else if "%JOB_STATUS%" == "cancelled" ( - landa-messenger-api chat-send ^ - --id "%CHAT_ID%" ^ - --api_key "%CHAT_KEY%" ^ - --title "🟠 Dry Run Publish - Windows Canceled" ^ - --body "%REPO%: v%VERSION%" ^ - --url "https://github.com/landamessenger/zstandard/actions/workflows/tag_version_and_publish.yml" ^ - --image "https://avatars.githubusercontent.com/u/63705403?s=200&v=4" ^ - --background_color "#55000000" ^ + elif [ "${{ job.status }}" == "cancelled" ]; then + landa-messenger-api chat-send \ + --id "${{ secrets.CHAT_ID }}" \ + --api_key "${{ secrets.CHAT_KEY }}" \ + --title "🟠 Dry Run Publish - Windows Canceled" \ + --body "${{ github.repository }}: v${{ env.VERSION }}" \ + --url "https://github.com/landamessenger/zstandard/actions/workflows/tag_version_and_publish.yml" \ + --image "https://avatars.githubusercontent.com/u/63705403?s=200&v=4" \ + --background_color "#55000000" \ --text_color "#FFFFFFFF" - ) else ( - landa-messenger-api chat-send ^ - --id "%CHAT_ID%" ^ - --api_key "%CHAT_KEY%" ^ - --title "🟢 Dry Run Publish - Windows Passed" ^ - --body "%REPO%: v%VERSION%" ^ - --url "https://github.com/landamessenger/zstandard/actions/workflows/tag_version_and_publish.yml" ^ - --image "https://avatars.githubusercontent.com/u/63705403?s=200&v=4" ^ - --background_color "#55000000" ^ + else + landa-messenger-api chat-send \ + --id "${{ secrets.CHAT_ID }}" \ + --api_key "${{ secrets.CHAT_KEY }}" \ + --title "🟢 Dry Run Publish - Windows Passed" \ + --body "${{ github.repository }}: v${{ env.VERSION }}" \ + --url "https://github.com/landamessenger/zstandard/actions/workflows/tag_version_and_publish.yml" \ + --image "https://avatars.githubusercontent.com/u/63705403?s=200&v=4" \ + --background_color "#55000000" \ --text_color "#FFFFFFFF" - ) \ No newline at end of file + fi