Bump the nuget group with 15 updates #153
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: PR Verify | |
| # Label-based workflow control: | |
| # - Always run Terraform plan against Development when Terraform exists (skips for drafts) | |
| # - 'deploy-dev': Runs Terraform plan+apply and deploys to Development (skips for drafts/dependabot) | |
| # - 'run-prd-plan': Runs Terraform plan against Production (skips for drafts/dependabot) | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, reopened, ready_for_review, labeled, unlabeled] | |
| permissions: {} | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build-and-test: | |
| permissions: | |
| contents: read | |
| id-token: write | |
| pull-requests: write | |
| if: github.event.pull_request.draft == false | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: frasermolyneux/actions/dotnet-ci@dotnet-ci/v1.4 | |
| with: | |
| dotnet-version: 10.0.x | |
| src-folder: "src" | |
| terraform-plan-dev: | |
| permissions: | |
| contents: read | |
| id-token: write | |
| pull-requests: write | |
| if: github.event.pull_request.draft == false && !contains(github.event.pull_request.labels.*.name, 'deploy-dev') | |
| needs: build-and-test | |
| environment: Development | |
| runs-on: ubuntu-latest | |
| concurrency: | |
| group: ${{ github.repository }}-dev | |
| env: | |
| AZURE_CLIENT_ID: ${{ vars.AZURE_CLIENT_ID }} | |
| AZURE_TENANT_ID: ${{ vars.AZURE_TENANT_ID }} | |
| AZURE_SUBSCRIPTION_ID: ${{ vars.AZURE_SUBSCRIPTION_ID }} | |
| steps: | |
| - uses: frasermolyneux/actions/terraform-plan@terraform-plan/v1.4 | |
| with: | |
| terraform-folder: "terraform" | |
| terraform-var-file: "tfvars/dev.tfvars" | |
| terraform-backend-file: "backends/dev.backend.hcl" | |
| AZURE_CLIENT_ID: ${{ env.AZURE_CLIENT_ID }} | |
| AZURE_TENANT_ID: ${{ env.AZURE_TENANT_ID }} | |
| AZURE_SUBSCRIPTION_ID: ${{ env.AZURE_SUBSCRIPTION_ID }} | |
| terraform-plan-and-apply-dev: | |
| permissions: | |
| contents: read | |
| id-token: write | |
| pull-requests: write | |
| if: github.event.pull_request.draft == false && github.event.pull_request.user.login != 'dependabot[bot]' && contains(github.event.pull_request.labels.*.name, 'deploy-dev') | |
| needs: build-and-test | |
| environment: Development | |
| runs-on: ubuntu-latest | |
| concurrency: | |
| group: ${{ github.repository }}-dev | |
| steps: | |
| - uses: frasermolyneux/actions/terraform-plan-and-apply@terraform-plan-and-apply/v1.4 | |
| with: | |
| terraform-folder: "terraform" | |
| terraform-var-file: "tfvars/dev.tfvars" | |
| terraform-backend-file: "backends/dev.backend.hcl" | |
| AZURE_CLIENT_ID: ${{ vars.AZURE_CLIENT_ID }} | |
| AZURE_TENANT_ID: ${{ vars.AZURE_TENANT_ID }} | |
| AZURE_SUBSCRIPTION_ID: ${{ vars.AZURE_SUBSCRIPTION_ID }} | |
| - id: terraform-output | |
| shell: bash | |
| run: | | |
| cd terraform | |
| echo "container_app_name=$(terraform output -raw container_app_name)" >> $GITHUB_OUTPUT | |
| echo "resource_group_name=$(terraform output -raw resource_group_name)" >> $GITHUB_OUTPUT | |
| echo "acr_login_server=$(terraform output -raw acr_login_server)" >> $GITHUB_OUTPUT | |
| env: | |
| ARM_CLIENT_ID: ${{ vars.AZURE_CLIENT_ID }} | |
| ARM_SUBSCRIPTION_ID: ${{ vars.AZURE_SUBSCRIPTION_ID }} | |
| ARM_TENANT_ID: ${{ vars.AZURE_TENANT_ID }} | |
| ARM_USE_AZUREAD: true | |
| ARM_USE_OIDC: true | |
| outputs: | |
| container_app_name: ${{ steps.terraform-output.outputs.container_app_name }} | |
| resource_group_name: ${{ steps.terraform-output.outputs.resource_group_name }} | |
| acr_login_server: ${{ steps.terraform-output.outputs.acr_login_server }} | |
| container-deploy-dev: | |
| permissions: | |
| contents: read | |
| id-token: write | |
| pull-requests: write | |
| if: github.event.pull_request.draft == false && github.event.pull_request.user.login != 'dependabot[bot]' && contains(github.event.pull_request.labels.*.name, 'deploy-dev') | |
| environment: Development | |
| needs: [build-and-test, terraform-plan-and-apply-dev] | |
| runs-on: ubuntu-latest | |
| concurrency: | |
| group: ${{ github.repository }}-dev | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Azure Login | |
| uses: azure/login@v3 | |
| with: | |
| client-id: ${{ vars.AZURE_CLIENT_ID }} | |
| tenant-id: ${{ vars.AZURE_TENANT_ID }} | |
| subscription-id: ${{ vars.AZURE_SUBSCRIPTION_ID }} | |
| - name: ACR Login | |
| run: az acr login --name ${{ needs.terraform-plan-and-apply-dev.outputs.acr_login_server }} | |
| - name: Docker Build and Push | |
| run: | | |
| IMAGE="${{ needs.terraform-plan-and-apply-dev.outputs.acr_login_server }}/portal-server-agent:${{ github.sha }}" | |
| IMAGE_LATEST="${{ needs.terraform-plan-and-apply-dev.outputs.acr_login_server }}/portal-server-agent:latest" | |
| docker build -t "$IMAGE" -t "$IMAGE_LATEST" -f src/Dockerfile src/ | |
| docker push "$IMAGE" | |
| docker push "$IMAGE_LATEST" | |
| - name: Update Container App | |
| run: | | |
| az containerapp update \ | |
| --name ${{ needs.terraform-plan-and-apply-dev.outputs.container_app_name }} \ | |
| --resource-group ${{ needs.terraform-plan-and-apply-dev.outputs.resource_group_name }} \ | |
| --image "${{ needs.terraform-plan-and-apply-dev.outputs.acr_login_server }}/portal-server-agent:${{ github.sha }}" | |
| terraform-plan-prd: | |
| permissions: | |
| contents: read | |
| id-token: write | |
| pull-requests: write | |
| if: github.event.pull_request.draft == false && contains(github.event.pull_request.labels.*.name, 'run-prd-plan') | |
| needs: build-and-test | |
| environment: Production | |
| runs-on: ubuntu-latest | |
| concurrency: | |
| group: ${{ github.repository }}-prd | |
| env: | |
| AZURE_CLIENT_ID: ${{ vars.AZURE_CLIENT_ID }} | |
| AZURE_TENANT_ID: ${{ vars.AZURE_TENANT_ID }} | |
| AZURE_SUBSCRIPTION_ID: ${{ vars.AZURE_SUBSCRIPTION_ID }} | |
| steps: | |
| - uses: frasermolyneux/actions/terraform-plan@terraform-plan/v1.4 | |
| with: | |
| terraform-folder: "terraform" | |
| terraform-var-file: "tfvars/prd.tfvars" | |
| terraform-backend-file: "backends/prd.backend.hcl" | |
| AZURE_CLIENT_ID: ${{ env.AZURE_CLIENT_ID }} | |
| AZURE_TENANT_ID: ${{ env.AZURE_TENANT_ID }} | |
| AZURE_SUBSCRIPTION_ID: ${{ env.AZURE_SUBSCRIPTION_ID }} |