Skip to content

Commit

Permalink
chore: disable gen
Browse files Browse the repository at this point in the history
  • Loading branch information
gentlementlegen committed Dec 3, 2024
1 parent 161d7d1 commit 26130a5
Showing 1 changed file with 30 additions and 30 deletions.
60 changes: 30 additions & 30 deletions .github/workflows/azure-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,36 +38,36 @@ jobs:
bun install --frozen-lockfile --production
popd
- name: Generate local.settings.json
env:
GITHUB_SECRETS: ${{ toJson(secrets) }}
shell: pwsh
run: |
$secretsJson = $env:GITHUB_SECRETS | ConvertFrom-Json
$settingsObject = @{
IsEncrypted = $false
Values = @{}
}
# Exclude specific GitHub-related secrets
$excludedPrefixes = @("GITHUB_", "ACTIONS_", "AZUREAPPSERVICE_")
foreach ($secretName in $secretsJson.PSObject.Properties.Name) {
$include = $true
foreach ($prefix in $excludedPrefixes) {
if ($secretName -like "$prefix*") {
$include = $false
break
}
}
if ($include) {
$settingsObject.Values[$secretName] = $secretsJson.$secretName
}
}
$settingsJson = $settingsObject | ConvertTo-Json -Depth 10
Set-Content -Path 'local.settings.json' -Value $settingsJson
# - name: Generate local.settings.json
# env:
# GITHUB_SECRETS: ${{ toJson(secrets) }}
# shell: pwsh
# run: |
# $secretsJson = $env:GITHUB_SECRETS | ConvertFrom-Json
# $settingsObject = @{
# IsEncrypted = $false
# Values = @{}
# }
#
# # Exclude specific GitHub-related secrets
# $excludedPrefixes = @("GITHUB_", "ACTIONS_", "AZUREAPPSERVICE_")
#
# foreach ($secretName in $secretsJson.PSObject.Properties.Name) {
# $include = $true
# foreach ($prefix in $excludedPrefixes) {
# if ($secretName -like "$prefix*") {
# $include = $false
# break
# }
# }
#
# if ($include) {
# $settingsObject.Values[$secretName] = $secretsJson.$secretName
# }
# }
#
# $settingsJson = $settingsObject | ConvertTo-Json -Depth 10
# Set-Content -Path 'local.settings.json' -Value $settingsJson

- name: Upload artifact for deployment job
uses: actions/upload-artifact@v4
Expand Down

0 comments on commit 26130a5

Please sign in to comment.