Deploy v2.2.1-wip to test #2452
Workflow file for this run
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: Deploy | |
run-name: Deploy ${{ inputs.git_ref_to_deploy || github.ref_name }} to ${{ inputs.environment }} | |
concurrency: | |
group: deploy-${{ inputs.environment }} | |
on: | |
workflow_call: | |
inputs: | |
environment: | |
required: true | |
type: string | |
server_types: | |
required: true | |
type: string | |
workflow_dispatch: | |
inputs: | |
git_ref_to_deploy: | |
description: | |
| # Use blank unicode character (U+2800) to force line-break | |
Use code from: ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ | |
(Git ref to deploy, for example, a tag, branch name or commit SHA. Will use workflow ref if not provided.) | |
type: string | |
environment: | |
description: Deployment environment | |
required: true | |
type: choice | |
options: | |
- qa | |
- test | |
- preview | |
- training | |
- production | |
- sandbox-alpha | |
- sandbox-beta | |
server_types: | |
description: Server types to deploy | |
required: true | |
type: choice | |
options: | |
- all | |
- web | |
- good-job | |
default: all | |
jobs: | |
determine-git-sha: | |
runs-on: ubuntu-latest | |
permissions: {} | |
outputs: | |
git-sha: ${{ steps.get-git-sha.outputs.git-sha }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ inputs.git_ref_to_deploy || github.sha }} | |
- name: Get git sha | |
id: get-git-sha | |
run: echo "git-sha=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT | |
build-and-push-image: | |
permissions: | |
id-token: write | |
needs: determine-git-sha | |
uses: ./.github/workflows/build-and-push-image.yml | |
with: | |
git-sha: ${{ needs.determine-git-sha.outputs.git-sha }} | |
deploy-infrastructure: | |
permissions: | |
id-token: write | |
needs: [build-and-push-image, determine-git-sha] | |
uses: ./.github/workflows/deploy-infrastructure.yml | |
with: | |
environment: ${{ inputs.environment }} | |
image_tag: ${{ needs.determine-git-sha.outputs.git-sha }} | |
deploy-application: | |
permissions: | |
id-token: write | |
needs: deploy-infrastructure | |
uses: ./.github/workflows/deploy-application.yml | |
with: | |
environment: ${{ inputs.environment }} | |
server_types: ${{ inputs.server_types }} | |
git_sha_to_deploy: ${{ needs.determine-git-sha.outputs.git-sha }} |