Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new vars to Terraform environment from GHA #489

Merged
merged 6 commits into from
Dec 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading