Sitemap
Anudee

Anudee

Github Actions B/G

Oct 12, 2024

name: Blue/Green Switch

on:

workflow_dispatch:

inputs:

project:

description: ‘ project name’

required: true

type: string

service:

description: ‘service name’

type: string

required: true

environment:

description: ‘Environment to do the switch. Either “e2all” or “e3all”’

type: choice

required: true

default: ‘e2all’

options:

- ‘e2all’

- ‘e3all’

rfc:

description: ‘ITSM RFC’

type: string

Get Anudee’s stories in your inbox

Join Medium for free to get updates from this writer.

required: false

default: ‘’

secrets:

ONE_CICD_USER:

description: One CICD Service account name

required: true

ONE_CICD_PASS:

description: CICD Service account pass

required: true

jobs:

blue-green-switch:

name: Blue Green Switch

runs-on: [ubuntu-latest-medium]

steps:

- name: Conditionally, switch ${{ inputs.environment }}

uses: ghactions/deploy@v3.0.10

id: ash_switch

with:

user: ${{ secrets.ONE_CICD_USER }}

password: ${{ secrets.ONE_CICD_PASS }}

env: ${{ inputs.environment }}

project: ${{ inputs.project }}

service: ${{ inputs.service }}

rfc: ${{ inputs.rfc }}

command: switch

--

--