Skip to content

Deploy on Events

Deploy on Events #122

Workflow file for this run

name: Deploy on Events
on:
repository_dispatch:
types: [dev-deploy]
workflow_dispatch:
inputs:
branch_name:
description: 'SC Branch or tag'
required: true
jobs:
branch_name:
runs-on: ubuntu-latest
outputs:
branch: ${{ steps.extract_branch.outputs.branch }}
steps:
- run: |
temp=${{ github.event.client_payload.branch }}
git_ref_name=${temp:-'${{ github.event.inputs.branch_name }}'}
echo "git_ref_name=$git_ref_name" >> $GITHUB_ENV
echo git_ref_name $git_ref_name
- name: Extract branch name
shell: bash
run: echo "branch=${git_ref_name}" >> $GITHUB_OUTPUT
id: extract_branch
deploy:
needs:
- branch_name
uses: ./.github/workflows/deploy.yml
with:
branch: ${{ needs.branch_name.outputs.branch }}
secrets:
token: ${{ secrets.GITHUB_TOKEN }}
DEV_VAULT_BRB: ${{ secrets.DEV_VAULT_BRB }}
DEV_VAULT_NBC: ${{ secrets.DEV_VAULT_NBC }}
DEV_VAULT_THR: ${{ secrets.DEV_VAULT_THR }}
DEV_VAULT_DBC: ${{ secrets.DEV_VAULT_DBC }}
DEV_KUBE_CONFIG_BRB: ${{ secrets.DEV_KUBE_CONFIG_BRB }}
DEV_KUBE_CONFIG_NBC: ${{ secrets.DEV_KUBE_CONFIG_NBC }}
DEV_KUBE_CONFIG_THR: ${{ secrets.DEV_KUBE_CONFIG_THR }}
DEV_KUBE_CONFIG_DBC: ${{ secrets.DEV_KUBE_CONFIG_DBC }}