From 71c68f7533b10924d5c25c7356c812ba257358a9 Mon Sep 17 00:00:00 2001 From: Nikita Andriyanov Date: Fri, 29 Aug 2025 13:59:27 +0300 Subject: [PATCH] deploy --- .github/workflows/deploy.yaml | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 0750cc7..9e4e476 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -30,20 +30,22 @@ 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: Map environment variable + id: map_env + run: | + declare -A env_map=( + ["prod"]="yc-transcoder" + ["stage"]="stage" + ) + mapped_env=${env_map[${{ inputs.environment }}]} + if [ -z "$mapped_env" ]; then + mapped_env="${{ inputs.environment }}" + fi + echo "mapped_environment=$mapped_env" >> $GITHUB_OUTPUT - name: deploy k8s - if: inputs.environment == 'stage' uses: https://bb.hublab.ru/HUB/workflows/.gitea/actions/k8s@HEAD with: secrets: ${{ toJSON(secrets) }} - environment: ${{ inputs.environment }} + environment: ${{ steps.map_env.outputs.mapped_environment }} tag: ${{ inputs.tag }} migrate: ${{ inputs.migrate }} \ No newline at end of file