-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Venkata Challa
committed
Jan 4, 2024
1 parent
d3f2c7b
commit bbe0d3b
Showing
2 changed files
with
52 additions
and
25 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: Deploy environment | ||
description: Deploys an application environment | ||
|
||
inputs: | ||
environment: | ||
description: The name of the environment | ||
required: true | ||
docker-image: | ||
description: The Docker image to deploy | ||
required: true | ||
azure-credentials: | ||
description: JSON object containing a service principal that can read from Azure Key Vault | ||
required: true | ||
pull-request-number: | ||
description: The pull request number which triggered this deploy. | ||
required: true | ||
|
||
runs: | ||
using: composite | ||
|
||
steps: | ||
- uses: hashicorp/setup-terraform@v3 | ||
with: | ||
terraform_version: 1.6.4 | ||
terraform_wrapper: false | ||
|
||
- uses: DFE-Digital/github-actions/set-arm-environment-variables@master | ||
with: | ||
azure-credentials: ${{ inputs.azure-credentials }} | ||
|
||
- name: Terraform Apply | ||
run: | | ||
make ci ${{ inputs.environment }} terraform-apply | ||
env: | ||
DOCKER_IMAGE_TAG: ${{ inputs.docker-image }} | ||
PR_NUMBER: ${{ inputs.pull-request-number }} | ||
|
||
- name: Get application URL | ||
id: get-app-url | ||
run: | | ||
url1="https://track-and-pay-${{ inputs.pull-request-number }}.test.teacherservices.cloud" | ||
echo "url1=${url1}" >> $GITHUB_OUTPUT | ||
url2="https://manage-school-placements-${{ inputs.pull-request-number }}.test.teacherservices.cloud" | ||
echo "url2=${url2}" >> $GITHUB_OUTPUT |
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