Compare commits
13 Commits
test6
...
8c7b4b5b1b
| Author | SHA1 | Date | |
|---|---|---|---|
| 8c7b4b5b1b | |||
| ac8829e417 | |||
| 44a12848a4 | |||
| 314dc872cc | |||
| 91eac576a5 | |||
| eb3206bbfc | |||
| fff78aa6b2 | |||
| f5787b5a9f | |||
| 16231c1d55 | |||
| 98511aaa46 | |||
| 1bd7e2c7ab | |||
| 070fa3c928 | |||
| 71c68f7533 |
@@ -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}}
|
||||
@@ -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] }}
|
||||
|
||||
|
||||
10
.github/workflows/deploy.yaml
vendored
10
.github/workflows/deploy.yaml
vendored
@@ -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) }}
|
||||
|
||||
6
.github/workflows/deployk8s.yaml
vendored
6
.github/workflows/deployk8s.yaml
vendored
@@ -44,11 +44,9 @@ jobs:
|
||||
environment: ${{ inputs.environment }}
|
||||
tag: ${{ inputs.tag }}
|
||||
migrate: ${{ inputs.migrate }}
|
||||
|
||||
notify:
|
||||
needs: [deploy]
|
||||
- name: post-notify
|
||||
if: always()
|
||||
uses: HUB/workflows/.github/workflows/notify.yaml@main
|
||||
uses: https://bb.hublab.ru/HUB/workflows/.gitea/actions/notify@HEAD
|
||||
with:
|
||||
result: ${{ needs.deploy.result}}
|
||||
name: k8s deploy ${{ inputs.environment }} tag ${{ inputs.tag }}
|
||||
|
||||
Reference in New Issue
Block a user