Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert ContainerBaseImage Testing - Push To Production #14

Merged
merged 6 commits into from
May 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 15 additions & 6 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
- 'DevCraftAspire.Web/**/*'

jobs:
# Build a custom base image with needed Linux dependencies installed (being done on a weekly schedule now)
# Build a custom base image with needed Linux dependencies preinstalled
update_base_image:
runs-on: ubuntu-latest
permissions:
Expand Down Expand Up @@ -49,7 +49,7 @@ jobs:
# - The ApiService project needs the custom base image, defined as ContainerBaseImage in the csproj
# - The rest can use the default mcr.microsoft.com/dotnet/aspnet:8.0 image
deploy_app:
needs: [update_base_image]
# needs: [update_base_image]
runs-on: ubuntu-latest
permissions:
id-token: write
Expand All @@ -66,6 +66,9 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Install .NET Aspire workload
run: dotnet nuget list source

# For azd deploy to pull base image defined in ApiService.csproj
- name: Login to ghcr.io
uses: azure/docker-login@v1
Expand All @@ -75,16 +78,22 @@ jobs:
password: ${{secrets.GITHUB_TOKEN}}

- name: Update NuGet Package Sources
run: dotnet nuget update source "TelerikServer" -s "https://nuget.telerik.com/v3/index.json" -u 'api-key' -p ${{secrets.TELERIK_NUGET_KEY}} --configfile ${{env.NUGET_CONF_PATH}} --store-password-in-clear-text
run: dotnet nuget update source "TelerikServer" -s "https://nuget.telerik.com/v3/index.json" -u 'api-key' -p ${{secrets.TELERIK_NUGET_KEY}} --store-password-in-clear-text

- name: Install .NET Aspire workload
run: dotnet workload install aspire

run: dotnet workload install aspire --ignore-failed-sources

# - name: BaseContainerImage Isolated Test
# run: |
# dotnet restore
# dotnet build -c Release --no-restore
# dotnet publish 'DevCraftAspire.ApiService/DevCraftAspire.ApiService.csproj' /t:PublishContainer --no-build --no-restore

- name: Install azd
uses: Azure/[email protected]

- name: Log into Azure with GitHub Federated Credentials (OpenID)
run: azd auth login --client-id "$Env:AZURE_CLIENT_ID" --tenant-id "$Env:AZURE_TENANT_ID" --federated-credential-provider "github"
run: azd auth login --client-id "${{env.AZURE_CLIENT_ID}}" --tenant-id "${{env.AZURE_TENANT_ID}}" --federated-credential-provider "github"
shell: pwsh

- name: Provision Infrastructure
Expand Down
4 changes: 1 addition & 3 deletions DevCraftAspire.ApiService/DevCraftAspire.ApiService.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<ContainerBaseImage>ghcr.io/lancemccarthy/aspirebase:8.0</ContainerBaseImage>
<!--<ContainerBaseImage>ghcr.io/lancemccarthy/aspirebase:8.0</ContainerBaseImage>-->
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
Expand All @@ -27,5 +26,4 @@
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>

</Project>