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

View File

@@ -19,12 +19,13 @@ inputs:
runs: runs:
using: 'composite' using: 'composite'
steps: steps:
- uses: mattermost/action-mattermost-notify@master - uses: dosymep/vk-teams-action@v1.0.0
env: env:
icons: '{"success" : ":white_check_mark:", "failure": ":x:", "canceled": ":facepalm:", "started": ":warning:"}' ICONS: '{"success":"✅","failure":"❌","canceled":"🤦","started":"⚠️"}'
with: with:
MATTERMOST_WEBHOOK_URL: ${{ fromJSON(inputs.secrets).MM_WEBHOOK_URL }} token: ${{ fromJSON(inputs.secrets).VK_TEAMS_BOT_TOKEN }}
PAYLOAD: | to: ${{ fromJSON(inputs.secrets).VK_TEAMS_CHAT_ID }}
{ format: MarkdownV2
"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]}}" 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 }} CR_REPO: ${{ github.event.repository.name }}
TAG: ${{ inputs.tag }} TAG: ${{ inputs.tag }}
steps: 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 - name: deploy k8s
if: inputs.environment == 'stage'
uses: https://bb.hublab.ru/HUB/workflows/.gitea/actions/k8s@HEAD uses: https://bb.hublab.ru/HUB/workflows/.gitea/actions/k8s@HEAD
with: with:
secrets: ${{ toJSON(secrets) }} secrets: ${{ toJSON(secrets) }}

View File

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