Skip to content

Deploy Serverless to all Production Accounts #37

Deploy Serverless to all Production Accounts

Deploy Serverless to all Production Accounts #37

# 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: Determine Configuration
runs-on: ubuntu-latest
outputs:
target_helplines: ${{ steps.determine-target-helplines.outputs.target_helplines }}
steps:
- uses: actions/checkout@v4
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1
- id: determine-target-helplines
name: Executing main-action
uses: ./.github/actions/determine-target-helplines-action
with:
environment: production
deploy-helplines:
name: Run All Production Deployments
needs: configure
uses: ./.github/workflows/deploy-multiple-accounts.yml
secrets: inherit
with:
helplines: ${{ needs.configure.outputs.target_helplines }}
environments: '[ "PROD" ]'