Skip to content

Commit

Permalink
Switch to dotnet dockerize
Browse files Browse the repository at this point in the history
  • Loading branch information
Layoric committed Nov 23, 2023
1 parent 48925e8 commit 6376dc7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
14 changes: 3 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,17 +63,9 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}

# Build and push new docker image, skip for manual redeploy other than 'latest'
- name: Build and push Docker images
uses: docker/build-push-action@v3
if: ${{ github.event.inputs.version == '' || github.event.inputs.version == 'latest' }}
with:
file: Dockerfile
context: .
push: true
tags: ghcr.io/${{ env.image_repository_name }}:${{ env.TAG_NAME }}
build-args: |
DEPLOY_API=${{ secrets.DEPLOY_API }}
DEPLOY_CDN=${{ secrets.DEPLOY_CDN }}
- name: Build and push Docker image
run: |
dotnet publish --os linux --arch x64 -c Release -p:ContainerRepository=${{ env.image_repository_name }} -p:ContainerRegistry=ghcr.io -p:ContainerImageTags=${{ env.TAG_NAME }} -p:ContainerPort=8080
- name: Create env.deploy_cdn
run: |
Expand Down
1 change: 1 addition & 0 deletions MyApp/MyApp.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<PublishProfile>DefaultContainer</PublishProfile>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
Expand Down

0 comments on commit 6376dc7

Please sign in to comment.