Files
workflows/.github/workflows/deployk8s.yaml
2025-10-16 10:48:38 +03:00

54 lines
1.6 KiB
YAML

on:
workflow_call:
inputs:
tag:
required: false
type: string
default: latest
debug:
required: false
type: boolean
default: false
migrate:
type: boolean
default: false
build:
type: boolean
default: false
environment:
type: string
required: true
host:
type: string
required: true
jobs:
deploy:
if: contains(format(',{0},', vars.ADMIN_USERS), format(',{0},', github.actor)) || inputs.environment=='stage'
runs-on: ubuntu-latest
env:
CR_REGISTRY: crp8vh46gd976oq8ipla
CR_REPO: ${{ github.event.repository.name }}
TAG: ${{ inputs.tag }}
steps:
- name: notify
uses: https://bb.hublab.ru/HUB/workflows/.gitea/actions/vk-notify@main
with:
result: 'started'
secrets: ${{ toJSON(secrets) }}
name: deploy ${{ inputs.environment }} tag ${{ inputs.tag }}
- name: deploy
id: k8s_deploy
uses: https://bb.hublab.ru/HUB/workflows/.gitea/actions/k8s@HEAD
with:
secrets: ${{ toJSON(secrets) }}
environment: ${{ inputs.environment }}
tag: ${{ inputs.tag }}
migrate: ${{ inputs.migrate }}
- name: post-notify
if: always()
uses: https://bb.hublab.ru/HUB/workflows/.gitea/actions/vk-notify@main
with:
result: ${{ steps.k8s_deploy.outcome }}
name: k8s deploy ${{ inputs.environment }} tag ${{ inputs.tag }}
secrets: ${{ toJSON(secrets) }}