Skip to content

Commit

Permalink
Merge pull request #1020 from sspenst/update-revert-to-specifi-sha
Browse files Browse the repository at this point in the history
Updated update-production workflow to allow an optional sha to be sup…
  • Loading branch information
Duceswild99 authored Oct 19, 2023
2 parents 0d5c72e + c837734 commit 116d876
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions .github/workflows/update-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ on:
options:
- update
- revert
desired_sha:
description: "[Optional] Target Short SHA"
required: false
default: ''
type: string
deployment_description:
description: "A brief description of what changed in this deployment"
required: false
Expand Down Expand Up @@ -53,5 +58,10 @@ jobs:
SSH_USER: ${{ secrets.SERVER_SSH_USER }}
SSH_KEY: ${{ secrets.SERVER_SSH_KEY }}

- name: Update Environments with New Containers
run: ssh ${{ matrix.server }} 'bash /opt/pathology/scripts/update-Environments.sh -e prod -a ${{ inputs.action }} -c "${{ inputs.deployment_description }}"'
- 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 }}"'

- 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 }}"'

0 comments on commit 116d876

Please sign in to comment.