diff --git a/.gitea/actions/notify/action.yaml b/.gitea/actions/notify/action.yaml index f55bdc9..9453bfd 100644 --- a/.gitea/actions/notify/action.yaml +++ b/.gitea/actions/notify/action.yaml @@ -10,6 +10,9 @@ inputs: required: false type: string default: build + secrets: + required: false + type: string env: icons: '{"success" : ":white_check_mark:", "failure": ":x:", "canceled": ":facepalm:", "started": ":warning:"}' @@ -19,7 +22,7 @@ runs: steps: - uses: mattermost/action-mattermost-notify@master with: - MATTERMOST_WEBHOOK_URL: ${{ secrets.MM_WEBHOOK_URL }} + MATTERMOST_WEBHOOK_URL: ${{ fromJSON(inputs.secrets).MM_WEBHOOK_URL }} PAYLOAD: | { "text": "${{ github.repository }} [${{inputs.name}}](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_number }}) was ${{ inputs.result }} by ${{ github.event.sender.login}} ${{ fromJson(env.icons)[inputs.result]}}" diff --git a/.github/workflows/deployk8s.yaml b/.github/workflows/deployk8s.yaml index fa58c27..3d57b4f 100644 --- a/.github/workflows/deployk8s.yaml +++ b/.github/workflows/deployk8s.yaml @@ -32,6 +32,10 @@ jobs: steps: - name: notify uses: https://bb.hublab.ru/HUB/workflows/.gitea/actions/notify@HEAD + with: + result: 'started' + secrets: ${{ toJSON(secrets) }} + name: deploy ${{ inputs.environment }} tag ${{ inputs.tag }} - name: Argo Login uses: clowdhaus/argo-cd-action/@main with: