Skip to content

Build and Test Infrastructure #11

Build and Test Infrastructure

Build and Test Infrastructure #11

Workflow file for this run

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