Deploy to Env - API #895
Workflow file for this run
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 to Env - API | |
on: | |
workflow_dispatch: | |
inputs: | |
environment: | |
description: "Deployment environment (dev|perf|staging|prod)" | |
default: dev | |
required: true | |
ref: | |
description: "Branch or Commit" | |
default: master | |
required: true | |
lambdaDeploy: | |
description: "Include Lambda in deployment?" | |
default: false | |
required: false | |
type: boolean | |
jobs: | |
setup-environment: | |
runs-on: ubuntu-latest | |
environment: ${{ inputs.environment }} | |
outputs: | |
git-hash: ${{ steps.set-hash.outputs.commit-hash }} | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v3 | |
with: | |
ref: ${{ inputs.ref }} | |
- name: Set Hash | |
id: set-hash | |
run: | | |
echo "commit-hash=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT | |
- name: Env Values | |
run: | | |
echo "The environment is ${{ inputs.environment }}" | |
echo "The branch/tag is ${{ inputs.ref }}" | |
echo "The commit hash is ${{ steps.set-hash.outputs.commit-hash }}" | |
run-build: | |
needs: [setup-environment] | |
uses: ./.github/workflows/build.yml | |
with: | |
environment: "${{ inputs.environment }}" | |
ref: "${{ needs.setup-environment.outputs.git-hash }}" | |
secrets: inherit | |
run-lambda-deploy: | |
if: ${{ inputs.lambdaDeploy }} | |
needs: [setup-environment] | |
uses: ./.github/workflows/lambda-functions.yml | |
with: | |
environment: "${{ inputs.environment }}" | |
ref: "${{ needs.setup-environment.outputs.git-hash }}" | |
lambdaName: "All" | |
secrets: inherit | |
run-deployment: | |
needs: [setup-environment, run-build] | |
uses: ./.github/workflows/deployment.yml | |
with: | |
environment: "${{ inputs.environment }}" | |
ref: "${{ needs.setup-environment.outputs.git-hash }}" | |
secrets: inherit | |
run-user-flows: | |
needs: [run-deployment] | |
if: ${{ inputs.environment == 'dev' }} | |
uses: ./.github/workflows/user_flows.yml | |
with: | |
environment: "${{ inputs.environment }}" | |
secrets: inherit | |
run-QA-suite: | |
needs: [run-deployment] | |
if: ${{ (inputs.environment == 'perf') || (inputs.environment == 'staging') }} | |
uses: ./.github/workflows/regression-public.yml | |
with: | |
qa-image-branch: "master" | |
environment: "${{ inputs.environment }}" | |
secrets: inherit |