Skip to content

Commit

Permalink
updating gh assets workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
andrea-putzu committed Feb 17, 2025
1 parent c10a058 commit c59ed46
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 27 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/call_publish_web_assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,14 @@ jobs:
tenant-id: ${{ vars.ARM_TENANT_ID }}
subscription-id: ${{ vars.ARM_SUBSCRIPTION_ID }}

- name: Upload app-io-premium-plans to blob storage
- name: Upload config.json to blob storage
run: |
upload_status=$(az storage blob upload \
--account-name "${{ env.STORAGE_ACCOUNT_NAME}}" \
--account-key "${{ secrets.STORAGE_CONTRACTS_ACCOUNT_KEY }}" \
--container '${{ env.STORAGE_CONTAINER }}' \
--file "./src/core/env/${{ inputs.environment }}/assets/app-io-premium-plans.json" \
--name "assets/app-io-premium-plans.json" \
--file "./src/core/env/${{ inputs.environment }}/assets/config.json" \
--name "assets/config.json" \
--overwrite true)
echo "${upload_status}"
Expand Down
24 changes: 0 additions & 24 deletions src/core/contracts-template.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,27 +14,3 @@ resource "null_resource" "upload_contract_templates" {
}
}

resource "null_resource" "app_io_premium_plans" {
# triggers = {
# file_sha1 = filesha1("./env/${var.env}/assets/app-io-premium-plans.json")
# }

provisioner "local-exec" {
command = <<EOT
az storage blob upload \
--container '$web' \
--account-name ${replace(replace(module.checkout_cdn.name, "-cdn-endpoint", "-sa"), "-", "")} \
--account-key ${module.checkout_cdn.storage_primary_access_key} \
--file "./env/${var.env}/assets/app-io-premium-plans.json" \
--overwrite true \
--name 'assets/app-io-premium-plans.json'
az cdn endpoint purge \
--resource-group ${azurerm_resource_group.checkout_fe_rg.name} \
--name ${module.checkout_cdn.name} \
--profile-name ${replace(module.checkout_cdn.name, "-cdn-endpoint", "-cdn-profile")} \
--content-paths "/assets/app-io-premium-plans.json" \
--no-wait
EOT
}
}

0 comments on commit c59ed46

Please sign in to comment.