Skip to content

Commit

Permalink
Pass config through
Browse files Browse the repository at this point in the history
  • Loading branch information
JakeGinnivan committed Aug 20, 2024
1 parent c7474f2 commit 741ceec
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
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 }}
# TODO Replace this PAT with a GitHub App
GH_CONTENT_TOKEN: ${{ secrets.GH_CONTENT_TOKEN }}

steps:
Expand Down
12 changes: 12 additions & 0 deletions infra/app/ddd.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ param containerAppsEnvironmentName string
param applicationInsightsName string
param gitHubOrganization string
param gitHubRepo string
@secure()
param gitHubToken string
param exists bool

resource identity 'Microsoft.ManagedIdentity/userAssignedIdentities@2023-01-31' = {
Expand Down Expand Up @@ -70,7 +72,12 @@ resource app 'Microsoft.App/containerApps@2024-03-01' = {
identity: identity.id
}
]
secrets: [
name: 'github-token'
value: gitHubToken
]
}
secrets
template: {
containers: [
{
Expand All @@ -92,8 +99,13 @@ resource app 'Microsoft.App/containerApps@2024-03-01' = {
{
name: 'GITHUB_REPO',
value: gitHubRepo
},
{
name: 'GITHUB_TOKEN',
secretRef: 'github-token'
}
]

resources: {
cpu: json('1.0')
memory: '2.0Gi'
Expand Down
3 changes: 3 additions & 0 deletions infra/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,9 @@ module ddd './app/ddd.bicep' = {
containerRegistryName: registry.outputs.name
exists: dddExists
environment: environmentName
gitHubOrganization: gitHubOrganization
gitHubRepo: gitHubRepo
gitHubToken: gitHubToken
}
scope: rg
}
Expand Down

0 comments on commit 741ceec

Please sign in to comment.