Manually deploy main triggered by Filip-L; version: pr-276 #1
This file contains hidden or 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: Manually trigger deploy to staging or production | |
run-name: "Manually deploy ${{ github.ref_name }} triggered by ${{ github.actor }}; version: ${{ inputs.version }}" | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
description: "Enter the version number" | |
required: true | |
default: "main" | |
environment: | |
required: false | |
description: "Select the environment to deploy to" | |
type: choice | |
options: | |
- staging | |
# TODO: uncomment this when we want to deploy to production | |
# - production | |
default: staging | |
permissions: | |
id-token: write | |
contents: read | |
jobs: | |
trigger-staging-deploy: | |
runs-on: ubuntu-latest | |
if: ${{ inputs.version != '' && inputs.environment == 'staging' }} | |
environment: production-fidl | |
steps: | |
- name: Trigger staging deploy | |
uses: neti-filplus-infra/filplus-deploy-action@main | |
with: | |
version: ${{ inputs.version }} | |
environment: ${{ inputs.environment }} | |
ecr-repository: filplus-backend | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID_IMAGE_DEPLOYER }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY_IMAGE_DEPLOYER }} | |
aws-region: us-east-1 | |
trigger-production-deploy: | |
runs-on: ubuntu-latest | |
if: ${{ github.ref_name == 'main' && inputs.version != '' && inputs.environment == 'production' }} | |
environment: production-fidl | |
steps: | |
- name: Trigger production deploy | |
uses: neti-filplus-infra/filplus-deploy-action@main | |
with: | |
version: ${{ inputs.version }} | |
environment: ${{ inputs.environment }} | |
ecr-repository: filplus-backend | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID_IMAGE_DEPLOYER }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY_IMAGE_DEPLOYER }} | |
aws-region: us-east-1 |