Skip to content

Commit

Permalink
NZ: Alejandro/nz/cherry picks (#610)
Browse files Browse the repository at this point in the history
* adding custom action

* staging -> production
  • Loading branch information
janorivera authored May 13, 2024
1 parent 172041f commit ba8869d
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/actions/custom-actions/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,3 +85,8 @@ runs:
- name: E2E Development release custom action
if: inputs.helpline-name == format('E2E_DEV')
uses: ./.github/actions/custom-actions/e2e_development_custom
- name: Youthline Production release custom action
if: inputs.helpline-name == format('NZ_PROD')
uses: ./.github/actions/custom-actions/youthline_production_custom
with:
account-sid: ${{ inputs.account-sid }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Copyright (C) 2021-2023 Technology Matters
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see https://www.gnu.org/licenses/.

name: 'Youthline Production release custom action'
description: 'Sets up environment variables related to non-standard additional features in use in the production environment'
inputs:
account-sid:
description: 'The Twilio Account SID for this account'
required: true
runs:
using: "composite"
steps:

# Modica environment variables
- name: Set Modica App Name
uses: "marvinpinto/action-inject-ssm-secrets@latest"
with:
ssm_parameter: "/production/modica/${{inputs.account-sid}}/app_name"
env_variable_name: "MODICA_APP_NAME"
- name: Set Modica App Password
uses: "marvinpinto/action-inject-ssm-secrets@latest"
with:
ssm_parameter: "/production/modica/${{inputs.account-sid}}/app_password"
env_variable_name: "MODICA_APP_PASSWORD"
- name: Set Modica Flex Flow Sid
uses: "marvinpinto/action-inject-ssm-secrets@latest"
with:
ssm_parameter: "/production/twilio/${{inputs.account-sid}}/modica_flex_flow_sid"
env_variable_name: "MODICA_FLEX_FLOW_SID"

# Append environment variables
- name: Add MODICA_APP_NAME
run: echo "MODICA_APP_NAME=${{ env.MODICA_APP_NAME }}" >> .env
shell: bash
- name: Add MODICA_APP_PASSWORD
run: echo "MODICA_APP_PASSWORD=${{ env.MODICA_APP_PASSWORD }}" >> .env
shell: bash
- name: Add MODICA_FLEX_FLOW_SID
run: echo "MODICA_FLEX_FLOW_SID=${{ env.MODICA_FLEX_FLOW_SID }}" >> .env
shell: bash

0 comments on commit ba8869d

Please sign in to comment.