-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (46 loc) · 1.57 KB
/
build-iac.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: Build and Test Infrastructure
on: workflow_dispatch
#push:
# branches: [ "main" ]
# paths:
# - "infra/*.bicep"
#pull_request:
# branches: [ "main" ]
# paths:
# - "infra/*.bicep"
permissions:
id-token: write
contents: read
jobs:
build:
runs-on: ubuntu-latest
environment: ci-test
steps:
- uses: actions/checkout@v4
- name: Login via Az module
uses: azure/login@v2
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
enable-AzPSSession: true
- name: Create settings file
uses: azure/powershell@v2
env:
ARTIFACT_LOCATION: ${{ steps.package-zip.outputs.ARTIFACT_LOCATION }}
with:
azPSVersion: "latest"
inlineScript: |
$settingsPath = Join-Path -Path (Resolve-Path ".\").Path -ChildPath 'test-infra-settings.json'
$settings = @{
ResourceGroup = "discord-image-iactest-$($env:GITHUB_RUN_ID)"
ApplicationName = "discord-image-iactest-$($env:GITHUB_RUN_ID)"
Location = "North Europe"
DiscordToken = 'mock token'
DiscordGuildId = 0
DiscordChannelId = 0
ExistingCognitiveServicesAccountName = "aisa-hjni-discord-image-poster"
ExistingCognitiveServicesResourceGroup = "hjni-discord-image-poster"
}
$settings | ConvertTo-Json | Set-Content -Path $settingsPath
./Create-Environment.ps1 -SettingsFile $settingsPath -NoDiscord