From dc14143f9d76b880974d7639b371bd7e07cb3be6 Mon Sep 17 00:00:00 2001 From: Thomas Jespersen Date: Tue, 15 Apr 2025 20:00:39 +0200 Subject: [PATCH 1/2] Upgrade all GitHub workflows to use centralized global.json for consistent .NET version --- .github/workflows/_migrate-database.yml | 2 +- .github/workflows/account-management.yml | 4 ++-- .github/workflows/app-gateway.yml | 2 +- .github/workflows/back-office.yml | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/_migrate-database.yml b/.github/workflows/_migrate-database.yml index 107cae2773..8ecc1582cf 100644 --- a/.github/workflows/_migrate-database.yml +++ b/.github/workflows/_migrate-database.yml @@ -62,7 +62,7 @@ jobs: - name: Setup .NET Core SDK uses: actions/setup-dotnet@v4 with: - dotnet-version: 9.0.x + global-json-file: application/global.json - name: Restore .NET Tools working-directory: application diff --git a/.github/workflows/account-management.yml b/.github/workflows/account-management.yml index 86f5b4aa88..21ee315c76 100644 --- a/.github/workflows/account-management.yml +++ b/.github/workflows/account-management.yml @@ -75,7 +75,7 @@ jobs: - name: Setup .NET Core SDK uses: actions/setup-dotnet@v4 with: - dotnet-version: 9.0.x + global-json-file: application/global.json - name: Restore .NET Tools working-directory: application @@ -174,7 +174,7 @@ jobs: - name: Setup .NET Core SDK uses: actions/setup-dotnet@v4 with: - dotnet-version: 9.0.x + global-json-file: application/global.json - name: Restore .NET Tools working-directory: application diff --git a/.github/workflows/app-gateway.yml b/.github/workflows/app-gateway.yml index 9e670233de..ddd3656caa 100644 --- a/.github/workflows/app-gateway.yml +++ b/.github/workflows/app-gateway.yml @@ -68,7 +68,7 @@ jobs: - name: Setup .NET Core SDK uses: actions/setup-dotnet@v4 with: - dotnet-version: 9.0.x + global-json-file: application/global.json - name: Restore .NET Tools working-directory: application diff --git a/.github/workflows/back-office.yml b/.github/workflows/back-office.yml index 70d0fc9775..e083cb68c2 100644 --- a/.github/workflows/back-office.yml +++ b/.github/workflows/back-office.yml @@ -75,7 +75,7 @@ jobs: - name: Setup .NET Core SDK uses: actions/setup-dotnet@v4 with: - dotnet-version: 9.0.x + global-json-file: application/global.json - name: Restore .NET Tools working-directory: application @@ -174,7 +174,7 @@ jobs: - name: Setup .NET Core SDK uses: actions/setup-dotnet@v4 with: - dotnet-version: 9.0.x + global-json-file: application/global.json - name: Restore .NET Tools working-directory: application From 0202649f80e20ccd9f125943ea0809a4cc7d8895 Mon Sep 17 00:00:00 2001 From: Thomas Jespersen Date: Tue, 15 Apr 2025 20:01:27 +0200 Subject: [PATCH 2/2] Update formatting for GitHub workflows with consistent indentation of blank lines --- .github/workflows/_deploy-container.yml | 4 ++-- .github/workflows/_deploy-infrastructure.yml | 2 +- .github/workflows/_migrate-database.yml | 6 +++--- .github/workflows/back-office.yml | 2 +- .github/workflows/pull-request-conventions.yml | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/_deploy-container.yml b/.github/workflows/_deploy-container.yml index 6e31aa46af..52110ec673 100644 --- a/.github/workflows/_deploy-container.yml +++ b/.github/workflows/_deploy-container.yml @@ -72,7 +72,7 @@ jobs: if: inputs.azure_environment == 'prod' run: | STAGING_REGISTRY_ID="/subscriptions/${{ vars.STAGING_SUBSCRIPTION_ID }}/resourceGroups/${{ env.UNIQUE_PREFIX }}-stage/providers/Microsoft.ContainerRegistry/registries/${{ env.UNIQUE_PREFIX }}stage" - + az acr import \ --name ${{ env.UNIQUE_PREFIX }}${{ env.ENVIRONMENT }} \ --source ${{ inputs.image_name }}:${{ inputs.version }} \ @@ -117,7 +117,7 @@ jobs: echo "New revision is Unhealthy. Running state: $RUNNING_STATUS" exit 1 fi - + echo "($i) Waiting for revision to become active. Running state: $RUNNING_STATUS" done echo "New revision did not become active in time. Running state: $RUNNING_STATUS" diff --git a/.github/workflows/_deploy-infrastructure.yml b/.github/workflows/_deploy-infrastructure.yml index 4aad05d531..9ec3b0f75f 100644 --- a/.github/workflows/_deploy-infrastructure.yml +++ b/.github/workflows/_deploy-infrastructure.yml @@ -66,7 +66,7 @@ jobs: - name: Plan Cluster Resources id: deploy_cluster run: bash ./cloud-infrastructure/cluster/deploy-cluster.sh ${{ inputs.unique_prefix }} ${{ inputs.azure_environment }} ${{ inputs.cluster_location }} ${{ inputs.cluster_location_acronym }} ${{ inputs.sql_admin_object_id }} ${{ inputs.domain_name }} --plan - + deploy: name: Deploy if: ${{ github.ref == 'refs/heads/main' }} diff --git a/.github/workflows/_migrate-database.yml b/.github/workflows/_migrate-database.yml index 8ecc1582cf..9eb3d757f9 100644 --- a/.github/workflows/_migrate-database.yml +++ b/.github/workflows/_migrate-database.yml @@ -93,7 +93,7 @@ jobs: run: | CONNECTION_STRING="Server=tcp:${{ env.SQL_SERVER_FQDN }},1433;Database=${{ inputs.database_name }};Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;Authentication=Active Directory Default;" - echo "Checking for pending migrations..." + echo "Checking for pending migrations..." MIGRATION_INFO=$(dotnet ef migrations list \ --project ${{ inputs.relative_project_path }} \ --startup-project ${{ inputs.relative_startup_project }} \ @@ -137,7 +137,7 @@ jobs: echo "$MIGRATION_JSON" echo "has_migrations_to_apply=false" >> $GITHUB_OUTPUT fi - + - name: Close Firewall if: always() working-directory: cloud-infrastructure/cluster @@ -168,7 +168,7 @@ jobs: const migrationsList = migrationJson.map(m => `- ${m.name} (${m.id})`).join('\n'); const migrationInfo = `## Approve Database Migration \`${{ inputs.database_name }}\` database on \`${{ inputs.azure_environment }}\` - + The following pending migration(s) will be applied to the database when approved: ${migrationsList} diff --git a/.github/workflows/back-office.yml b/.github/workflows/back-office.yml index e083cb68c2..d76ab4a4f2 100644 --- a/.github/workflows/back-office.yml +++ b/.github/workflows/back-office.yml @@ -59,7 +59,7 @@ jobs: run: | deploy_staging="${{ github.ref == 'refs/heads/main' && vars.STAGING_CLUSTER_ENABLED == 'true' || (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'Deploy to Staging')) }}" echo "deploy_staging=$deploy_staging" >> $GITHUB_OUTPUT - + deploy_production="${{ github.ref == 'refs/heads/main' && vars.PRODUCTION_CLUSTER1_ENABLED == 'true' }}" echo "deploy_production=$deploy_production" >> $GITHUB_OUTPUT diff --git a/.github/workflows/pull-request-conventions.yml b/.github/workflows/pull-request-conventions.yml index ca0a18b88e..3918a8f54b 100644 --- a/.github/workflows/pull-request-conventions.yml +++ b/.github/workflows/pull-request-conventions.yml @@ -71,7 +71,7 @@ jobs: # Check if description contains the phrase "pull request" DESCRIPTION=$(gh pr view $PULL_REQUEST_NUMBER --json body -q '.body' --repo $GITHUB_REPOSITORY) DESCRIPTION_LOWER="${DESCRIPTION,,}" - + if echo "$DESCRIPTION_LOWER" | grep -qiE 'pull(-)?request\b'; then echo "❌ Pull request description should not contain the phrase 'pull request' or 'pull-request'" EXIT_CODE=1 @@ -87,7 +87,7 @@ jobs: echo "❌ Please check the box: 'I have added tests, or done manual regression tests'" EXIT_CODE=1 fi - + if ! echo "$DESCRIPTION" | grep -q "\- \[x\] I have updated the documentation, if necessary"; then echo "❌ Please check the box: 'I have updated the documentation, if necessary'" EXIT_CODE=1