Skip to content

Commit

Permalink
Add new vars to Terraform environment from GHA (#489)
Browse files Browse the repository at this point in the history
* add vars

* test new sha

* test new sha

* test new sha

* test new sha

* clean up

---------

Co-authored-by: Administrator <[email protected]>
  • Loading branch information
derekadombek and Administrator authored Dec 18, 2024
1 parent 8164f48 commit 612d460
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
10 changes: 9 additions & 1 deletion .github/actions/tf-setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,19 @@ runs:
env:
RESOURCE_GROUP_NAME: ${{ inputs.azure-resource-group }}
NAME: ${{ inputs.app-name }}
SKU_NAME: P3v3
SKU_NAME: S2
OBJECT_ID: ${{ inputs.azure-object-id }}
TENANT_ID: ${{ inputs.azure-tenant-id }}
CLIENT_ID: ${{ inputs.azure-client-id }}
SUBSCRIPTION_ID: ${{ inputs.azure-subscription-id }}
run: |
echo resource_group_name=\""$RESOURCE_GROUP_NAME"\" >> terraform.tfvars
echo name=\""$NAME"\" >> terraform.tfvars
echo sku_name=\""$SKU_NAME"\" >> terraform.tfvars
echo object_id=\""$OBJECT_ID"\" >> terraform.tfvars
echo tenant_id=\""$TENANT_ID"\" >> terraform.tfvars
echo client_id=\""$CLIENT_ID"\" >> terraform.tfvars
echo subscription_id=\""$SUBSCRIPTION_ID"\" >> terraform.tfvars
az config set defaults.group=$RESOURCE_GROUP_NAME
- name: Set environment
shell: bash
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/deploy-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
USER_INPUT="${{ github.event.inputs.middleware-docker-tag }}"
echo "docker_tag=$(
#this gives a new sha as default if dispatch input is empty
echo ${USER_INPUT:-"${{ github.sha }}"}
echo ${USER_INPUT:-$(uuidgen)}
)" >> $GITHUB_OUTPUT
- name: Check if image exists
id: image_check
Expand Down Expand Up @@ -78,7 +78,7 @@ jobs:
USER_INPUT="${{ github.event.inputs.ocr-docker-tag }}"
echo "docker_tag=$(
#this gives a new sha as default if dispatch input is empty
echo ${USER_INPUT:-"${{ github.sha }}"}
echo ${USER_INPUT:-$(uuidgen)}
)" >> $GITHUB_OUTPUT
- name: Check if image exists
id: image_check
Expand Down Expand Up @@ -132,7 +132,7 @@ jobs:
azure-client-id: ${{ secrets.AZURE_CLIENT_ID }}
azure-tenant-id: ${{ secrets.AZURE_TENANT_ID }}
azure-subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
object-id: ${{ secrets.AZURE_OBJECT_ID }}
azure-object-id: ${{ secrets.AZURE_OBJECT_ID }}
app-name: reportvision

deploy-middleware:
Expand Down

0 comments on commit 612d460

Please sign in to comment.