Skip to content

Commit

Permalink
Add github config
Browse files Browse the repository at this point in the history
  • Loading branch information
JakeGinnivan committed Aug 20, 2024
1 parent 02df106 commit c7474f2
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:
AZURE_LOCATION: australiaeast
AZURE_CLIENT_ID: ${{ vars.AZURE_CLIENT_ID }}
AZURE_TENANT_ID: ${{ vars.AZURE_TENANT_ID }}
GH_CONTENT_TOKEN: ${{ secrets.GH_CONTENT_TOKEN }}

steps:
- name: Checkout
Expand Down
12 changes: 11 additions & 1 deletion infra/app/ddd.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ param identityName string
param containerRegistryName string
param containerAppsEnvironmentName string
param applicationInsightsName string
param gitHubOrganization string
param gitHubRepo string
param exists bool

resource identity 'Microsoft.ManagedIdentity/userAssignedIdentities@2023-01-31' = {
Expand Down Expand Up @@ -45,7 +47,7 @@ module fetchLatestImage '../modules/fetch-container-image.bicep' = {
}
}

resource app 'Microsoft.App/containerApps@2023-05-02-preview' = {
resource app 'Microsoft.App/containerApps@2024-03-01' = {
name: name
location: location
tags: union(tags, {'azd-service-name': 'ddd' })
Expand Down Expand Up @@ -82,6 +84,14 @@ resource app 'Microsoft.App/containerApps@2023-05-02-preview' = {
{
name: 'PORT'
value: '80'
},
{
name: 'GITHUB_ORGANIZATION',
value: gitHubOrganization
},
{
name: 'GITHUB_REPO',
value: gitHubRepo
}
]
resources: {
Expand Down
8 changes: 8 additions & 0 deletions infra/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@ param dddExists bool
@description('Id of the user or app to assign application roles')
param principalId string

@minLength(1)
param gitHubOrganization string
@minLength(1)
param gitHubRepo string
@minLength(1)
@secure()
param gitHubToken string

// Tags that should be applied to all resources.
//
// Note that 'azd-service-name' tags should be applied separately to service host resources.
Expand Down
9 changes: 9 additions & 0 deletions infra/main.parameters.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,15 @@
},
"principalId": {
"value": "${AZURE_PRINCIPAL_ID}"
},
"gitHubOrganization": {
"value": "dddwa"
},
"gitHubRepo": {
"value": "dddperth"
},
"gitHubToken": {
"value": "${GH_CONTENT_TOKEN}"
}
}
}

0 comments on commit c7474f2

Please sign in to comment.