deploy
This commit is contained in:
24
.github/workflows/deploy.yaml
vendored
24
.github/workflows/deploy.yaml
vendored
@@ -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 }}
|
||||
Reference in New Issue
Block a user