🚀 Deploy release-0.12.0 to staging #49
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 🚀 Deploy | |
on: | |
workflow_dispatch: | |
inputs: | |
tag_to_deploy: | |
type: string | |
description: "Branch name, Version number or Sha hash to deploy" | |
required: true | |
environment: | |
type: choice | |
description: "Environment to deploy to" | |
required: true | |
default: "qa" | |
options: | |
- prd | |
- qa | |
- sandbox | |
- staging | |
- dev | |
env: | |
AWS_REGION: "eu-west-1" | |
CLUSTER_NAME_PREFIX: demo-projects | |
permissions: | |
actions: read | |
checks: read | |
contents: write | |
deployments: read | |
id-token: write | |
issues: read | |
discussions: read | |
packages: read | |
pages: read | |
pull-requests: read | |
repository-projects: read | |
security-events: read | |
statuses: read | |
run-name: 🚀 Deploy ${{ inputs.tag_to_deploy }} to ${{ inputs.environment }} | |
jobs: | |
# ===================================================== | |
# Job: Deploy Non-Production Environments | |
# ===================================================== | |
deploy_non_prd: | |
runs-on: ubuntu-latest | |
if: (github.event_name == 'workflow_dispatch' && (inputs.environment == 'qa' || inputs.environment == 'staging')) | |
strategy: | |
matrix: | |
include: | |
- service_name: arketype-${{ inputs.environment }}-service | |
ecr: venly-arketype-arm-eu-west-1 | |
environment: "${{ inputs.environment }}" | |
steps: | |
- name: ✅ Checkout | |
uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: 🚀 Deploy Application | |
uses: ./.github/actions/ecs_deploy | |
with: | |
aws_region: ${{ env.AWS_REGION }} | |
aws_role: ${{ secrets.NONPRD_DEPLOY_ROLE }} | |
aws_ecr_role: ${{ secrets.RESOURCES_DEPLOY_ROLE }} | |
cluster_name: ${{ env.CLUSTER_NAME_PREFIX }}-cluster | |
ecr_repo: ${{ matrix.ecr }} | |
environment: ${{ matrix.environment }} | |
service_name: ${{ matrix.service_name }} | |
slack_webhook: ${{ secrets.SLACK_CI_DEPLOYS }} | |
tag_to_deploy: ${{ inputs.tag_to_deploy }} | |
token: ${{ secrets.GITHUB_TOKEN }} | |
# ===================================================== | |
# Job: Deploy Production Environments | |
# ===================================================== | |
deploy_prd: | |
runs-on: ubuntu-latest | |
if: (github.event_name == 'workflow_dispatch' && (inputs.environment == 'prd' || inputs.environment == 'sandbox')) | |
strategy: | |
matrix: | |
include: | |
- service_name: arketype-${{ inputs.environment }}-service | |
ecr: venly-arketype-arm-eu-west-1 | |
environment: "${{ inputs.environment }}" | |
steps: | |
- name: ✅ Checkout | |
uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: ℹ️ Deploy info | |
uses: ./.github/actions/ecs_deploy | |
with: | |
environment: ${{ matrix.environment }} | |
deployed_tag: ${{ inputs.tag_to_deploy }} | |
- name: 🚀 Deploy Application | |
uses: ArkaneNetwork/venly-github-workflows/.github/actions/ecs_deploy@main | |
with: | |
aws_region: ${{ env.AWS_REGION }} | |
aws_role: ${{ secrets.NONPRD_DEPLOY_ROLE }} | |
aws_ecr_role: ${{ secrets.RESOURCES_DEPLOY_ROLE }} | |
cluster_name: ${{ env.CLUSTER_NAME_PREFIX }}-cluster | |
ecr_repo: ${{ matrix.ecr }} | |
environment: ${{ matrix.environment }} | |
service_name: ${{ matrix.service_name }} | |
slack_webhook: ${{ secrets.SLACK_CI_DEPLOYS }} | |
tag_to_deploy: ${{ inputs.tag_to_deploy }} | |
token: ${{ secrets.GITHUB_TOKEN }} |