Skip to content

Commit

Permalink
updated deploy action so it supports multiple environments
Browse files Browse the repository at this point in the history
  • Loading branch information
Duceswild99 committed Nov 15, 2023
1 parent 5adf45f commit 9e18217
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/update-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@ name: Update Production
on:
workflow_dispatch:
inputs:
environment:
description: 'Environment'
required: true
default: 'prod'
type: choice
options:
- stage
- prod
action:
description: 'Desired action against env'
required: true
Expand Down Expand Up @@ -60,8 +68,8 @@ jobs:

- name: Update Environments with New Containers - Default
if: github.event.inputs.desired_sha == ''
run: ssh ${{ matrix.server }} 'bash /opt/pathology/scripts/update-Environments.sh -e prod -a ${{ inputs.action }} -c "${{ inputs.deployment_description }}"'
run: ssh ${{ matrix.server }} 'bash /opt/pathology/scripts/update-Environments.sh -e ${{ inputs.environment }} -a ${{ inputs.action }} -c "${{ inputs.deployment_description }}"'

- name: Update Environments with New Containers - With SHA
if: github.event.inputs.desired_sha != ''
run: ssh ${{ matrix.server }} 'bash /opt/pathology/scripts/update-Environments.sh -e prod -a ${{ inputs.action }} -c "${{ inputs.deployment_description }}" -v "${{ inputs.desired_sha }}"'
run: ssh ${{ matrix.server }} 'bash /opt/pathology/scripts/update-Environments.sh -e ${{ inputs.environment }} -a ${{ inputs.action }} -c "${{ inputs.deployment_description }}" -v "${{ inputs.desired_sha }}"'

0 comments on commit 9e18217

Please sign in to comment.