13 Commits

Author SHA1 Message Date
8c7b4b5b1b Merge branch 'main' into new_notify 2025-09-23 15:28:15 +00:00
ac8829e417 Merge branch 'new_notify' of bb.hublab.ru:HUB/workflows into new_notify 2025-09-23 18:28:01 +03:00
44a12848a4 change 2025-09-23 18:27:54 +03:00
314dc872cc Merge pull request 'change 2nd notify' (#16) from new_notify into main
Reviewed-on: #16
2025-09-23 15:12:29 +00:00
91eac576a5 Merge branch 'main' into new_notify 2025-09-23 15:12:10 +00:00
eb3206bbfc change 2nd notify 2025-09-23 18:11:36 +03:00
fff78aa6b2 Merge pull request 'test new notify' (#15) from new_notify into main
Reviewed-on: #15
2025-09-23 14:07:30 +00:00
f5787b5a9f test new notify 2025-09-23 17:05:44 +03:00
16231c1d55 fix version 2025-09-05 16:57:15 +03:00
98511aaa46 test 2025-09-05 16:55:25 +03:00
1bd7e2c7ab fix 2025-09-05 16:32:37 +03:00
070fa3c928 revert 2025-09-05 16:28:28 +03:00
71c68f7533 deploy 2025-08-29 13:59:27 +03:00
4 changed files with 22 additions and 33 deletions

View File

@@ -21,38 +21,38 @@ runs:
- name: Argo Login
uses: clowdhaus/argo-cd-action/@main
with:
version: 2.13.3
version: 3.1.3
command: login
options: ${{ vars.ARGO_HOST }} --username ${{ vars.ARGO_USER }} --password ${{ fromJSON(inputs.secrets).ARGO_PASSWORD }}
- name: Change tag name
uses: clowdhaus/argo-cd-action/@main
with:
version: 2.13.3
version: 3.1.3
command: app set ${{ inputs.environment }} --parameter images.${{github.event.repository.name}}=${{ inputs.tag }}
- name: Sync changes
if: ${{ inputs.migrate == 'true' }}
uses: clowdhaus/argo-cd-action/@main
with:
version: 2.13.3
version: 3.1.3
command: app sync ${{ inputs.environment }} --resource apps:Deployment:${{github.event.repository.name}}
- name: Migrate
if: ${{ inputs.migrate == 'true' }}
uses: clowdhaus/argo-cd-action/@main
with:
version: 2.13.3
version: 3.1.3
command: app actions run ${{ inputs.environment }} migrate --kind Deployment --resource-name ${{github.event.repository.name}}
- name: Sync changes
uses: clowdhaus/argo-cd-action/@main
with:
version: 2.13.3
version: 3.1.3
command: app sync ${{ inputs.environment }} --resource 'apps:Deployment:*'
- name: Refresh secret
uses: clowdhaus/argo-cd-action/@main
with:
version: 2.13.3
version: 3.1.3
command: app actions run ${{ inputs.environment }} refresh --kind ExternalSecret --resource-name vault-${{github.event.repository.name}}
- name: Restart service
uses: clowdhaus/argo-cd-action/@main
with:
version: 2.13.3
version: 3.1.3
command: app actions run ${{ inputs.environment }} restart --kind Deployment --resource-name ${{github.event.repository.name}}

View File

@@ -19,12 +19,13 @@ inputs:
runs:
using: 'composite'
steps:
- uses: mattermost/action-mattermost-notify@master
- uses: dosymep/vk-teams-action@v1.0.0
env:
icons: '{"success" : ":white_check_mark:", "failure": ":x:", "canceled": ":facepalm:", "started": ":warning:"}'
ICONS: '{"success":"✅","failure":"❌","canceled":"🤦","started":"⚠️"}'
with:
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]}}"
}
token: ${{ fromJSON(inputs.secrets).VK_TEAMS_BOT_TOKEN }}
to: ${{ fromJSON(inputs.secrets).VK_TEAMS_CHAT_ID }}
format: MarkdownV2
message: |
${{ 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] }}

View File

@@ -30,17 +30,7 @@ jobs:
CR_REPO: ${{ github.event.repository.name }}
TAG: ${{ inputs.tag }}
steps:
- name: deploy
if: inputs.environment == 'prod' || inputs.environment == 'demo'
uses: https://bb.hublab.ru/HUB/workflows/.gitea/actions/deploy@HEAD
with:
secrets: ${{ toJSON(secrets) }}
environment: ${{ inputs.environment }}
tag: ${{ inputs.tag }}
migrate: ${{ inputs.migrate }}
host: ${{ inputs.host }}
- name: deploy k8s
if: inputs.environment == 'stage'
uses: https://bb.hublab.ru/HUB/workflows/.gitea/actions/k8s@HEAD
with:
secrets: ${{ toJSON(secrets) }}

View File

@@ -44,12 +44,10 @@ jobs:
environment: ${{ inputs.environment }}
tag: ${{ inputs.tag }}
migrate: ${{ inputs.migrate }}
notify:
needs: [deploy]
if: always()
uses: HUB/workflows/.github/workflows/notify.yaml@main
with:
result: ${{ needs.deploy.result}}
name: k8s deploy ${{ inputs.environment }} tag ${{ inputs.tag }}
secrets: inherit
- name: post-notify
if: always()
uses: https://bb.hublab.ru/HUB/workflows/.gitea/actions/notify@HEAD
with:
result: ${{ needs.deploy.result}}
name: k8s deploy ${{ inputs.environment }} tag ${{ inputs.tag }}
secrets: inherit