Skip to content

Deploy Serverless to all Production Accounts #22

Deploy Serverless to all Production Accounts

Deploy Serverless to all Production Accounts #22

# 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/.
# This is a basic workflow to deploy Serverless to all helpline production environments
name: Deploy Serverless to all Production Accounts
on:
workflow_dispatch:
jobs:
configure:
name: Load Configuration
runs-on: ubuntu-latest
outputs:
production_helplines: ${{ steps.read-config.outputs.production_helplines }}
steps:
- name: Checkout
uses: actions/checkout@v3
- id: read-config
run: |
content=`jq -c '.' ./.github/workflows/config/production-helplines.json`
echo "production_helplines=$content" >> $GITHUB_OUTPUT
deploy-helplines:
name: Run All Production Deployments
needs: configure
uses: ./.github/workflows/deploy-multiple-accounts.yml
secrets: inherit
with:
helplines: ${{ needs.configure.outputs.production_helplines }}
environments: '[ "PROD" ]'