Skip to content

Deploy v2.1.2 to copilotmigration #2401

Deploy v2.1.2 to copilotmigration

Deploy v2.1.2 to copilotmigration #2401

Workflow file for this run

name: Deploy
run-name: Deploy ${{ inputs.git_tag || 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:
environment:
description: Deployment environment
required: true
type: choice
options:
- qa
- poc
- test
- preview
- training
- production
- copilotmigration
server_types:
description: Server types to deploy
required: true
type: choice
options:
- all
- web
- good-job
default: all
git_tag:
description: Git tag to deploy
required: false
type: string
jobs:
determine-git-sha:
runs-on: ubuntu-latest
outputs:
git-sha: ${{ steps.get-git-sha.outputs.git-sha }}
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ inputs.git_tag || github.sha }}
- name: Get git sha
id: get-git-sha
run: |
if [ -z "${{ inputs.git_tag }}" ]; then
echo "No git tag provided. Using the latest commit sha"
echo "git-sha=${{ github.sha }}" >> $GITHUB_OUTPUT
else
git_sha=$(git rev-parse refs/tags/${{ inputs.git_tag }})
echo "Git tag provided. Using the sha of the tagged commit: $git_sha"
echo "git-sha=$git_ssha" >> $GITHUB_OUTPUT
fi
build-and-push-image:
needs: determine-git-sha
uses: ./.github/workflows/build-and-push-image.yml
with:
git-sha: ${{ needs.determine-git-sha.outputs.git-sha }}
deploy-infrastructure:
needs: build-and-push-image
uses: ./.github/workflows/deploy-infrastructure.yml
with:
environment: ${{ inputs.environment }}
git-sha: ${{ needs.determine-git-sha.outputs.git-sha }}
deploy-application:
needs: deploy-infrastructure
uses: ./.github/workflows/deploy-application.yml
with:
environment: ${{ inputs.environment }}
image_tag: ${{ needs.determine-git-sha.outputs.git-sha }}
server_types: ${{ inputs.server_types }}