Skip to content

promote-env

promote-env #7

Workflow file for this run

name: promote-env
on:
workflow_dispatch:
inputs:
environment:
required: true
type: choice
description: Environment to deploy to
options:
- staging
- production
env:
HUMCTL_VERSION: '*'
jobs:
job:
runs-on: ubuntu-22.04
steps:
- name: install humctl
uses: humanitec/setup-cli-action@v1
with:
version: ${{ env.HUMCTL_VERSION }}
- name: promote humanitec env
run: |
if [ "${{ github.event.inputs.environment }}" == "staging" ]; then
humctl deploy env development staging \
--token ${{ secrets.HUMANITEC_TOKEN }} \
--org ${{ secrets.HUMANITEC_ORG }} \
--app ${{ vars.APP_NAME }}
else
humctl deploy env staging production \
--token ${{ secrets.HUMANITEC_TOKEN }} \
--org ${{ secrets.HUMANITEC_ORG }} \
--app ${{ vars.APP_NAME }}
fi