Skip to content

Commit

Permalink
Change publish profile reference
Browse files Browse the repository at this point in the history
  • Loading branch information
Yongkiat Goh committed Feb 19, 2022
1 parent ebbac0c commit d744beb
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .github/workflows/azure-messaging-function.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,17 @@ jobs:
pushd './${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}'
dotnet build --configuration Release --output ./output
popd
- name: Get Pubilsh Profile
id: getPublishProfile
run: |
echo "::set-output name=PUBLISH_PROFILE::$(az webapp deployment list-publishing-profiles -g '${{ needs.terraform.outputs.rgName }}' -n 'app-service-name' --xml)"
- name: 'Run Azure Functions Action'
uses: Azure/functions-action@v1
id: fa
with:
app-name: ${{ env.AZURE_FUNCTIONAPP_NAME }}
package: '${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}/output'
publish-profile: ${{ secrets.AZURE_MESSAGING_FUNCTIONAPP_PUBLISH_PROFILE }}
publish-profile: ${{ steps.getPublishProfile.outputs.PUBLISH_PROFILE }}
9 changes: 9 additions & 0 deletions .github/workflows/terraform-create-resource.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ jobs:
ARM_CLIENT_SECRET: ${{ secrets.ARM_CLIENT_SECRET }}
ARM_SUBSCRIPTION_ID: ${{ secrets.ARM_SUBSCRIPTION_ID }}
ARM_TENANT_ID: ${{ secrets.ARM_TENANT_ID }}

outputs:
rgName: ${{ steps.getResourceGroupName.outputs.rgName }}

steps:
- name: Checkout
Expand All @@ -37,3 +40,9 @@ jobs:
- name: Terraform Apply
run: terraform apply -auto-approve
working-directory: ./terraform/terraform-create-resource

- name: Get Resource Group name
id: getResourceGroupName
run: |
echo "::set-output name=rgName::$(terraform output -raw rgName)"
4 changes: 4 additions & 0 deletions terraform/terraform-create-resource/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,7 @@ provider "azurerm" {
features {}
}

output "rgName" {
value = azurerm_resource_group.rg.name
}

0 comments on commit d744beb

Please sign in to comment.