Skip to content

Commit

Permalink
PATCH: Alejandro/v1.20 rc cherry picks (#694)
Browse files Browse the repository at this point in the history
* CO

* JM

* TH

* readd flex flow parameters

* add inputs

---------

Co-authored-by: Sinekhaya <[email protected]>
  • Loading branch information
janorivera and sinehome authored Sep 24, 2024
1 parent 3bb787b commit ce859b3
Show file tree
Hide file tree
Showing 4 changed files with 87 additions and 4 deletions.
9 changes: 9 additions & 0 deletions .github/actions/custom-actions/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ runs:
uses: ./.github/actions/custom-actions/thailand_staging_custom
with:
account-sid: ${{ inputs.account-sid }}
- name: Childline Thailand Production release custom action
if: inputs.helpline-name == format('TH_PROD')
uses: ./.github/actions/custom-actions/thailand_production_custom
with:
account-sid: ${{ inputs.account-sid }}
- name: Aarambh Staging release custom action
if: inputs.helpline-name == format('IN_STG')
uses: ./.github/actions/custom-actions/aarambh_staging_custom
Expand Down Expand Up @@ -63,6 +68,8 @@ runs:
- name: SafeSpot Production release custom action
if: inputs.helpline-name == format('JM_PROD')
uses: ./.github/actions/custom-actions/jamaica_production_custom
with:
account-sid: ${{ inputs.account-sid }}
- name: Malawi Staging release custom action
if: inputs.helpline-name == format('MW_STG')
uses: ./.github/actions/custom-actions/malawi_staging_custom
Expand All @@ -83,6 +90,8 @@ runs:
- name: TeGuio Colombia Production release custom action
if: inputs.helpline-name == format('CO_PROD')
uses: ./.github/actions/custom-actions/teguio_production_custom
with:
account-sid: ${{ inputs.account-sid }}
- name: Kellimni Malta Production release custom action
if: inputs.helpline-name == format('MT_PROD')
uses: ./.github/actions/custom-actions/kellimni_production_custom
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@

name: 'SafeSpot Production release custom action'
description: 'Sets up environment variables related to non-standard additional features in use in SafeSpot (JM) Production environment'
inputs:
account-sid:
description: 'The Twilio Account SID for this account'
required: true
runs:
using: "composite"
steps:
Expand All @@ -33,6 +37,16 @@ runs:
with:
ssm_parameter: "PROD_TWILIO_JM_INSTAGRAM_FLEX_FLOW_SID"
env_variable_name: "INSTAGRAM_FLEX_FLOW_SID"
- name: Set helpline Instagram Studio Flow SID
uses: "marvinpinto/action-inject-ssm-secrets@latest"
with:
ssm_parameter: "/production/twilio/${{inputs.account-sid}}/instagram_studio_flow_sid"
env_variable_name: "INSTAGRAM_STUDIO_FLOW_SID"
- name: Set helpline Instagram Flex Messaging Mode (Programmable Chat or Conversations)
uses: "marvinpinto/action-inject-ssm-secrets@latest"
with:
ssm_parameter: "/production/instagram/${{inputs.account-sid}}/messaging_mode"
env_variable_name: "INSTAGRAM_TWILIO_MESSAGING_MODE"
# Append environment variables
- name: Add FACEBOOK_APP_SECRET
run: echo "FACEBOOK_APP_SECRET=${{ env.FACEBOOK_APP_SECRET }}" >> .env
Expand All @@ -42,4 +56,10 @@ runs:
shell: bash
- name: Add INSTAGRAM_FLEX_FLOW_SID
run: echo "INSTAGRAM_FLEX_FLOW_SID=${{ env.INSTAGRAM_FLEX_FLOW_SID }}" >> .env
shell: bash
- name: Add INSTAGRAM_STUDIO_FLOW_SID
run: echo "INSTAGRAM_STUDIO_FLOW_SID=${{ env.INSTAGRAM_STUDIO_FLOW_SID }}" >> .env
shell: bash
- name: Add INSTAGRAM_TWILIO_MESSAGING_MODE
run: echo "INSTAGRAM_TWILIO_MESSAGING_MODE=${{ env.INSTAGRAM_TWILIO_MESSAGING_MODE }}" >> .env
shell: bash
22 changes: 20 additions & 2 deletions .github/actions/custom-actions/teguio_production_custom/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@

name: 'Te Guio Production release custom action'
description: 'Sets up environment variables related to non-standard additional features in use in the beta environment'
nputs:
account-sid:
description: 'The Twilio Account SID for this account'
required: true
runs:
using: "composite"
steps:
Expand All @@ -33,8 +37,16 @@ runs:
with:
ssm_parameter: "PROD_TWILIO_CO_INSTAGRAM_FLEX_FLOW_SID"
env_variable_name: "INSTAGRAM_FLEX_FLOW_SID"


- name: Set helpline Instagram Studio Flow SID
uses: "marvinpinto/action-inject-ssm-secrets@latest"
with:
ssm_parameter: "/production/twilio/${{inputs.account-sid}}/instagram_studio_flow_sid"
env_variable_name: "INSTAGRAM_STUDIO_FLOW_SID"
- name: Set helpline Instagram Flex Messaging Mode (Programmable Chat or Conversations)
uses: "marvinpinto/action-inject-ssm-secrets@latest"
with:
ssm_parameter: "/production/instagram/${{inputs.account-sid}}/messaging_mode"
env_variable_name: "INSTAGRAM_TWILIO_MESSAGING_MODE"
# Append environment variables
- name: Add FACEBOOK_APP_SECRET
run: echo "FACEBOOK_APP_SECRET=${{ env.FACEBOOK_APP_SECRET }}" >> .env
Expand All @@ -45,3 +57,9 @@ runs:
- name: Add INSTAGRAM_FLEX_FLOW_SID
run: echo "INSTAGRAM_FLEX_FLOW_SID=${{ env.INSTAGRAM_FLEX_FLOW_SID }}" >> .env
shell: bash
- name: Add INSTAGRAM_STUDIO_FLOW_SID
run: echo "INSTAGRAM_STUDIO_FLOW_SID=${{ env.INSTAGRAM_STUDIO_FLOW_SID }}" >> .env
shell: bash
- name: Add INSTAGRAM_TWILIO_MESSAGING_MODE
run: echo "INSTAGRAM_TWILIO_MESSAGING_MODE=${{ env.INSTAGRAM_TWILIO_MESSAGING_MODE }}" >> .env
shell: bash
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,12 @@
# 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: 'Childline Thailand Staging release custom action'
name: 'Childline Thailand Production release custom action'
description: 'Sets up environment variables related to non-standard additional features in use in the thailand production environment'
nputs:
account-sid:
description: 'The Twilio Account SID for this account'
required: true
runs:
using: "composite"
steps:
Expand All @@ -23,6 +27,11 @@ runs:
with:
ssm_parameter: "PROD_TWILIO_TH_LINE_FLEX_FLOW_SID"
env_variable_name: "LINE_FLEX_FLOW_SID"
- name: Set helpline Line Studio Flow SID
uses: "marvinpinto/action-inject-ssm-secrets@latest"
with:
ssm_parameter: "/production/twilio/${{inputs.account-sid}}/line_studio_flow_sid"
env_variable_name: "LINE_STUDIO_FLOW_SID"
- name: Set Line Channel Secret
uses: "marvinpinto/action-inject-ssm-secrets@latest"
with:
Expand All @@ -33,6 +42,11 @@ runs:
with:
ssm_parameter: "/production/line/${{inputs.account-sid}}/channel_access_token"
env_variable_name: "LINE_CHANNEL_ACCESS_TOKEN"
- name: Set helpline Line Flex Messaging Mode (Programmable Chat or Conversations)
uses: "marvinpinto/action-inject-ssm-secrets@latest"
with:
ssm_parameter: "/production/line/${{inputs.account-sid}}/messaging_mode"
env_variable_name: "LINE_TWILIO_MESSAGING_MODE"
# Set Instagram variables
- name: Set Aselo Facebook App Secret
uses: "marvinpinto/action-inject-ssm-secrets@latest"
Expand All @@ -42,23 +56,39 @@ runs:
- name: Set helpline Facebook Page Access Token
uses: "marvinpinto/action-inject-ssm-secrets@latest"
with:
ssm_parameter: "FACEBOOK_PAGE_ACCESS_TOKEN_100136349533502_Childline-TH-Staging"
ssm_parameter: "FACEBOOK_PAGE_ACCESS_TOKEN_59591583805_Childline-Thailand-Foundation"
env_variable_name: "FACEBOOK_PAGE_ACCESS_TOKEN"
- name: Set helpline Instagram Flex Flow SID
uses: "marvinpinto/action-inject-ssm-secrets@latest"
with:
ssm_parameter: "PROD_TWILIO_TH_INSTAGRAM_FLEX_FLOW_SID"
env_variable_name: "INSTAGRAM_FLEX_FLOW_SID"
- name: Set helpline Instagram Studio Flow SID
uses: "marvinpinto/action-inject-ssm-secrets@latest"
with:
ssm_parameter: "/production/twilio/${{inputs.account-sid}}/instagram_studio_flow_sid"
env_variable_name: "INSTAGRAM_STUDIO_FLOW_SID"
- name: Set helpline Instagram Flex Messaging Mode (Programmable Chat or Conversations)
uses: "marvinpinto/action-inject-ssm-secrets@latest"
with:
ssm_parameter: "/production/instagram/${{inputs.account-sid}}/messaging_mode"
env_variable_name: "INSTAGRAM_TWILIO_MESSAGING_MODE"
# Append LINE environment variables
- name: Add LINE_FLEX_FLOW_SID
run: echo "LINE_FLEX_FLOW_SID=${{ env.LINE_FLEX_FLOW_SID }}" >> .env
shell: bash
- name: Add LINE_STUDIO_FLOW_SID
run: echo "LINE_STUDIO_FLOW_SID=${{ env.LINE_STUDIO_FLOW_SID }}" >> .env
shell: bash
- name: Add LINE_CHANNEL_SECRET
run: echo "LINE_CHANNEL_SECRET=${{ env.LINE_CHANNEL_SECRET }}" >> .env
shell: bash
- name: Add LINE_CHANNEL_ACCESS_TOKEN
run: echo "LINE_CHANNEL_ACCESS_TOKEN=${{ env.LINE_CHANNEL_ACCESS_TOKEN }}" >> .env
shell: bash
- name: Add LINE_TWILIO_MESSAGING_MODE
run: echo "LINE_TWILIO_MESSAGING_MODE=${{ env.LINE_TWILIO_MESSAGING_MODE }}" >> .env
shell: bash
# Append INSTAGRAM environment variables
- name: Add FACEBOOK_APP_SECRET
run: echo "FACEBOOK_APP_SECRET=${{ env.FACEBOOK_APP_SECRET }}" >> .env
Expand All @@ -69,3 +99,9 @@ runs:
- name: Add INSTAGRAM_FLEX_FLOW_SID
run: echo "INSTAGRAM_FLEX_FLOW_SID=${{ env.INSTAGRAM_FLEX_FLOW_SID }}" >> .env
shell: bash
- name: Add INSTAGRAM_STUDIO_FLOW_SID
run: echo "INSTAGRAM_STUDIO_FLOW_SID=${{ env.INSTAGRAM_STUDIO_FLOW_SID }}" >> .env
shell: bash
- name: Add INSTAGRAM_TWILIO_MESSAGING_MODE
run: echo "INSTAGRAM_TWILIO_MESSAGING_MODE=${{ env.INSTAGRAM_TWILIO_MESSAGING_MODE }}" >> .env
shell: bash

0 comments on commit ce859b3

Please sign in to comment.