Skip to content

Commit

Permalink
Merge branch 'v1.21-rc' into CHI-3070-flags
Browse files Browse the repository at this point in the history
  • Loading branch information
mythilytm authored Nov 6, 2024
2 parents 8e75591 + 153a77a commit 6c26676
Show file tree
Hide file tree
Showing 74 changed files with 1,975 additions and 898 deletions.
14 changes: 14 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,9 +90,16 @@ 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
- name: Kellimni Malta Staging release custom action
if: inputs.helpline-name == format('MT_STG')
uses: ./.github/actions/custom-actions/kellimni_staging_custom
with:
account-sid: ${{ inputs.account-sid }}
- name: Zambia Staging release custom action
if: inputs.helpline-name == format('ZM_STG')
uses: ./.github/actions/custom-actions/zambia_staging_custom
Expand Down
37 changes: 36 additions & 1 deletion .github/actions/custom-actions/aselo_staging_custom/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,29 @@ runs:
ssm_parameter: "/staging/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"
with:
ssm_parameter: "FACEBOOK_APP_SECRET"
env_variable_name: "FACEBOOK_APP_SECRET"
- name: Set helpline Facebook Page Access Token
uses: "marvinpinto/action-inject-ssm-secrets@latest"
with:
ssm_parameter: "FACEBOOK_PAGE_ACCESS_TOKEN_398416306680981_Aselo-Staging"
env_variable_name: "FACEBOOK_PAGE_ACCESS_TOKEN"
- name: Set helpline Instagram Studio Flow SID
uses: "marvinpinto/action-inject-ssm-secrets@latest"
with:
ssm_parameter: "/staging/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: "/staging/instagram/${{inputs.account-sid}}/messaging_mode"
env_variable_name: "INSTAGRAM_TWILIO_MESSAGING_MODE"


# Append environment variables
- name: Add TELEGRAM_FLEX_BOT_TOKEN
run: echo "TELEGRAM_FLEX_BOT_TOKEN=${{ env.TELEGRAM_FLEX_BOT_TOKEN }}" >> .env
Expand All @@ -94,4 +117,16 @@ runs:
- name: Add LINE_TWILIO_MESSAGING_MODE
run: echo "LINE_TWILIO_MESSAGING_MODE=${{ env.LINE_TWILIO_MESSAGING_MODE }}" >> .env
shell: bash

- name: Add FACEBOOK_APP_SECRET
run: echo "FACEBOOK_APP_SECRET=${{ env.FACEBOOK_APP_SECRET }}" >> .env
shell: bash
- name: Add FACEBOOK_PAGE_ACCESS_TOKEN
run: echo "FACEBOOK_PAGE_ACCESS_TOKEN=${{ env.FACEBOOK_PAGE_ACCESS_TOKEN }}" >> .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 @@ -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
62 changes: 62 additions & 0 deletions .github/actions/custom-actions/kellimni_staging_custom/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# 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: 'Kellimni MT Staging release custom action'
description: 'Sets up environment variables related to non-standard additional features in use in the beta environment'
inputs:
account-sid:
description: 'The Twilio Account SID for this account'
required: true
runs:
using: "composite"
steps:
# Telegram environment variables
- name: Set Telegram Flex Bot Token
uses: "marvinpinto/action-inject-ssm-secrets@latest"
with:
ssm_parameter: "/staging/telegram/${{inputs.account-sid}}/flex_bot_token"
env_variable_name: "TELEGRAM_FLEX_BOT_TOKEN"
- name: Set Telegram Bot Api Secret Token
uses: "marvinpinto/action-inject-ssm-secrets@latest"
with:
ssm_parameter: "/staging/telegram/${{inputs.account-sid}}/bot_api_secret_token"
env_variable_name: "TELEGRAM_BOT_API_SECRET_TOKEN"
- name: Set helpline Telegram Studio Flow SID
uses: "marvinpinto/action-inject-ssm-secrets@latest"
with:
ssm_parameter: "/staging/twilio/${{inputs.account-sid}}/telegram_studio_flow_sid"
env_variable_name: "TELEGRAM_STUDIO_FLOW_SID"
- name: Set helpline serverless URL
uses: "marvinpinto/action-inject-ssm-secrets@latest"
with:
ssm_parameter: "/staging/serverless/${{inputs.account-sid}}/base_url"
env_variable_name: "SERVERLESS_BASE_URL"
- name: Set Telegram flex bot webhook
shell: bash
run: |
curl --request POST \
--header "Content-Type: application/json" \
--url "https://api.telegram.org/bot${{ env.TELEGRAM_FLEX_BOT_TOKEN }}/setWebhook" \
--data '{ "url": "${{ env.SERVERLESS_BASE_URL }}/webhooks/telegram/TelegramToFlex", "secret_token": "${{ env.TELEGRAM_BOT_API_SECRET_TOKEN }}" }'
# Append environment variables
- name: Add TELEGRAM_FLEX_BOT_TOKEN
run: echo "TELEGRAM_FLEX_BOT_TOKEN=${{ env.TELEGRAM_FLEX_BOT_TOKEN }}" >> .env
shell: bash
- name: Add TELEGRAM_BOT_API_SECRET_TOKEN
run: echo "TELEGRAM_BOT_API_SECRET_TOKEN=${{ env.TELEGRAM_BOT_API_SECRET_TOKEN }}" >> .env
shell: bash
- name: Add TELEGRAM_STUDIO_FLOW_SID
run: echo "TELEGRAM_STUDIO_FLOW_SID=${{ env.TELEGRAM_STUDIO_FLOW_SID }}" >> .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
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,17 @@ runs:
with:
ssm_parameter: "/production/twilio/${{inputs.account-sid}}/modica_flex_flow_sid"
env_variable_name: "MODICA_FLEX_FLOW_SID"

- name: Set Modica Studio Flow Sid
uses: "marvinpinto/action-inject-ssm-secrets@latest"
with:
ssm_parameter: "/production/twilio/${{inputs.account-sid}}/modica_studio_flow_sid"
env_variable_name: "MODICA_STUDIO_FLOW_SID"
- name: Set helpline Modica Flex Messaging Mode (Programmable Chat or Conversations)
uses: "marvinpinto/action-inject-ssm-secrets@latest"
with:
ssm_parameter: "/production/modica/${{inputs.account-sid}}/messaging_mode"
env_variable_name: "MODICA_TWILIO_MESSAGING_MODE"

# Append environment variables
- name: Add MODICA_APP_NAME
run: echo "MODICA_APP_NAME=${{ env.MODICA_APP_NAME }}" >> .env
Expand All @@ -48,4 +58,10 @@ runs:
shell: bash
- name: Add MODICA_FLEX_FLOW_SID
run: echo "MODICA_FLEX_FLOW_SID=${{ env.MODICA_FLEX_FLOW_SID }}" >> .env
shell: bash
shell: bash
- name: Add MODICA_STUDIO_FLOW_SID
run: echo "MODICA_STUDIO_FLOW_SID=${{ env.MODICA_STUDIO_FLOW_SID }}" >> .env
shell: bash
- name: Add MODICA_TWILIO_MESSAGING_MODE
run: echo "MODICA_TWILIO_MESSAGING_MODE=${{ env.MODICA_TWILIO_MESSAGING_MODE }}" >> .env
shell: bash
Loading

0 comments on commit 6c26676

Please sign in to comment.