Skip to content

Commit

Permalink
Use my updated action
Browse files Browse the repository at this point in the history
  • Loading branch information
benchiverton committed Jul 1, 2024
1 parent 28f4b13 commit 67a03c8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 32 deletions.
8 changes: 0 additions & 8 deletions .github/workflows/instance-deploy-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,6 @@ jobs:
run: |
mkdir terraform-outputs
terraform -chdir=instance output -raw resource_group_name > terraform-outputs/resource_group_name.txt
terraform -chdir=instance output -raw container_app_api_fqdn > terraform-outputs/container_app_api_fqdn.txt
terraform -chdir=instance output -raw container_app_website_fqdn > terraform-outputs/container_app_website_fqdn.txt
terraform -chdir=instance show -json | jq -r '.values.outputs.container_app_monitoring_fqdn.value // ""' > container_app_monitoring_fqdn.txt
- name: Upload terraform outputs for deploy job
uses: actions/upload-artifact@v3
with:
Expand All @@ -105,17 +102,13 @@ jobs:
shell: bash
run: |
echo "resource_group_name=$(cat resource_group_name.txt)" >> $GITHUB_ENV
echo "container_app_api_fqdn=$(cat container_app_api_fqdn.txt)" >> $GITHUB_ENV
echo "container_app_website_fqdn=$(cat container_app_website_fqdn.txt)" >> $GITHUB_ENV
echo "container_app_monitoring_fqdn=$(cat container_app_monitoring_fqdn.txt)" >> $GITHUB_ENV
- name: Login via Azure CLI
uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
- name: Deploy api
uses: azure/container-apps-deploy-action@v1
with:
yamlConfigPath: .github/workflows/config/container-environment-config.yaml
acrName: onlinestorecontainerregistry
acrUsername: ${{ secrets.ACR_USERNAME }}
acrPassword: ${{ secrets.ACR_TOKEN }}
Expand All @@ -128,7 +121,6 @@ jobs:
- name: Deploy website
uses: azure/container-apps-deploy-action@v1
with:
yamlConfigPath: .github/workflows/config/container-environment-config.yaml
acrName: onlinestorecontainerregistry
acrUsername: ${{ secrets.ACR_USERNAME }}
acrPassword: ${{ secrets.ACR_TOKEN }}
Expand Down
12 changes: 3 additions & 9 deletions .github/workflows/instance-deploy-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,6 @@ jobs:
run: |
mkdir terraform-outputs
terraform -chdir=instance output -raw resource_group_name > terraform-outputs/resource_group_name.txt
terraform -chdir=instance output -raw container_app_api_fqdn > terraform-outputs/container_app_api_fqdn.txt
terraform -chdir=instance output -raw container_app_website_fqdn > terraform-outputs/container_app_website_fqdn.txt
terraform -chdir=instance output -raw container_app_monitoring_fqdn > terraform-outputs/container_app_monitoring_fqdn.txt
- name: Upload terraform outputs for deploy job
uses: actions/upload-artifact@v3
with:
Expand All @@ -108,21 +105,18 @@ jobs:
shell: bash
run: |
echo "resource_group_name=$(cat resource_group_name.txt)" >> $GITHUB_ENV
echo "container_app_api_fqdn=$(cat container_app_api_fqdn.txt)" >> $GITHUB_ENV
echo "container_app_website_fqdn=$(cat container_app_website_fqdn.txt)" >> $GITHUB_ENV
echo "container_app_monitoring_fqdn=$(cat container_app_monitoring_fqdn.txt)" >> $GITHUB_ENV
- name: Login via Azure CLI
uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
- name: Deploy api
uses: azure/container-apps-deploy-action@v1
uses: benchiverton/container-apps-deploy-action@container-env-resource-group
with:
yamlConfigPath: .github/workflows/config/container-environment-config.yaml
acrName: onlinestorecontainerregistry
acrUsername: ${{ secrets.ACR_USERNAME }}
acrPassword: ${{ secrets.ACR_TOKEN }}
containerAppName: ${{ github.head_ref }}-onlinestore-api
containerAppEnvironmentResourceGroup: onlinestore-shared-rg
imageToDeploy: onlinestorecontainerregistry.azurecr.io/onlinestore-api:${{ github.sha }}
location: 'East US'
resourceGroup: ${{ env.resource_group_name }}
Expand All @@ -131,11 +125,11 @@ jobs:
- name: Deploy website
uses: azure/container-apps-deploy-action@v1
with:
yamlConfigPath: .github/workflows/config/container-environment-config.yaml
acrName: onlinestorecontainerregistry
acrUsername: ${{ secrets.ACR_USERNAME }}
acrPassword: ${{ secrets.ACR_TOKEN }}
containerAppName: ${{ github.head_ref }}-onlinestore-website
containerAppEnvironmentResourceGroup: onlinestore-shared-rg
imageToDeploy: onlinestorecontainerregistry.azurecr.io/onlinestore-website:${{ github.sha }}
location: 'East US'
resourceGroup: ${{ env.resource_group_name }}
Expand Down
15 changes: 0 additions & 15 deletions terraform/instance/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,3 @@ output "resource_group_name" {
value = azurerm_resource_group.instance.name
sensitive = false
}

output "container_app_api_fqdn" {
value = azurerm_container_app.api.ingress[0].fqdn
sensitive = false
}

output "container_app_website_fqdn" {
value = azurerm_container_app.website.ingress[0].fqdn
sensitive = false
}

output "container_app_monitoring_fqdn" {
value = azurerm_container_app.monitoring.ingress[0].fqdn
sensitive = false
}

0 comments on commit 67a03c8

Please sign in to comment.