From 59d50a60ed5b4f3ce645e939806ef7a09ebe2146 Mon Sep 17 00:00:00 2001 From: alex Date: Wed, 15 Oct 2025 15:25:44 +0300 Subject: [PATCH] update --- .gitea/actions/vk-notify/action.yaml | 10 ++++++++++ .github/workflows/build.yaml | 12 +++++++----- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/.gitea/actions/vk-notify/action.yaml b/.gitea/actions/vk-notify/action.yaml index 8630b0f..b3aea20 100644 --- a/.gitea/actions/vk-notify/action.yaml +++ b/.gitea/actions/vk-notify/action.yaml @@ -14,6 +14,16 @@ inputs: runs: using: 'composite' steps: + - name: Resolve token/from env if missing + shell: bash + run: | + if [ -z "${{ inputs.token }}" ] && [ -n "${VK_TEAMS_BOT_TOKEN}" ]; then + echo "token=${VK_TEAMS_BOT_TOKEN}" >> $GITHUB_ENV + fi + if [ -z "${{ inputs.to }}" ] && [ -n "${VK_TEAMS_CHAT_ID}" ]; then + echo "to=${VK_TEAMS_CHAT_ID}" >> $GITHUB_ENV + fi + - name: Set icon id: icon shell: bash diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index dcd0693..196df76 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -28,11 +28,12 @@ jobs: steps: - name: Notify (started) uses: https://bb.hublab.ru/HUB/workflows/.gitea/actions/vk-notify@main + env: + VK_TEAMS_BOT_TOKEN: ${{ secrets.VK_TEAMS_BOT_TOKEN }} + VK_TEAMS_CHAT_ID: ${{ secrets.VK_TEAMS_CHAT_ID }} with: result: started name: build tag ${{ inputs.tag }} - token: ${{ secrets.VK_TEAMS_BOT_TOKEN }} - to: ${{ secrets.VK_TEAMS_CHAT_ID }} - uses: actions/checkout@v4 with: @@ -109,8 +110,9 @@ jobs: - name: Notify (result) if: always() uses: https://bb.hublab.ru/HUB/workflows/.gitea/actions/vk-notify@main + env: + VK_TEAMS_BOT_TOKEN: ${{ secrets.VK_TEAMS_BOT_TOKEN }} + VK_TEAMS_CHAT_ID: ${{ secrets.VK_TEAMS_CHAT_ID }} with: - result: ${{ steps.build-step.outcome }} + result: started name: build tag ${{ inputs.tag }} - token: ${{ secrets.VK_TEAMS_BOT_TOKEN }} - to: ${{ secrets.VK_TEAMS_CHAT_ID }} -- 2.49.1