mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 04:56:49 +00:00
fix .net docker build
This commit is contained in:
parent
0fa0070d41
commit
e573e978da
5 changed files with 13 additions and 2 deletions
|
|
@ -4,6 +4,7 @@
|
|||
# Include project code and build files
|
||||
!PluralKit.*/
|
||||
!Myriad/
|
||||
!Serilog/
|
||||
!.git
|
||||
!dashboard
|
||||
!crates/
|
||||
|
|
|
|||
8
.github/workflows/dotnet-docker.yml
vendored
8
.github/workflows/dotnet-docker.yml
vendored
|
|
@ -2,7 +2,9 @@ name: Build and push Docker image
|
|||
on:
|
||||
push:
|
||||
paths:
|
||||
- '.github/workflows/docker.yml'
|
||||
- '.dockerignore'
|
||||
- '.github/workflows/dotnet-docker.yml'
|
||||
- 'ci/Dockerfile.dotnet'
|
||||
- 'ci/dotnet-version.sh'
|
||||
- 'Myriad/**'
|
||||
- 'PluralKit.API/**'
|
||||
|
|
@ -23,6 +25,9 @@ jobs:
|
|||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.CR_PAT }}
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: true
|
||||
|
||||
- run: echo "BRANCH_NAME=${GITHUB_REF#refs/heads/}" | sed 's|/|-|g' >> $GITHUB_ENV
|
||||
|
||||
- name: Extract Docker metadata
|
||||
|
|
@ -41,6 +46,7 @@ jobs:
|
|||
with:
|
||||
# https://github.com/docker/build-push-action/issues/378
|
||||
context: .
|
||||
file: ci/Dockerfile.dotnet
|
||||
push: true
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
cache-from: type=registry,ref=ghcr.io/pluralkit/pluralkit:${{ env.BRANCH_NAME }}
|
||||
|
|
|
|||
1
.github/workflows/rust-docker.yml
vendored
1
.github/workflows/rust-docker.yml
vendored
|
|
@ -3,6 +3,7 @@ on:
|
|||
push:
|
||||
paths:
|
||||
- 'crates/**'
|
||||
- '.dockerignore'
|
||||
- '.github/workflows/rust.yml'
|
||||
- 'ci/Dockerfile.rust'
|
||||
- 'ci/rust-docker-target.sh'
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ COPY PluralKit.Bot/PluralKit.Bot.csproj /app/PluralKit.Bot/
|
|||
COPY PluralKit.Core/PluralKit.Core.csproj /app/PluralKit.Core/
|
||||
COPY PluralKit.Tests/PluralKit.Tests.csproj /app/PluralKit.Tests/
|
||||
COPY .git/ /app/.git
|
||||
COPY Serilog/ /app/Serilog/
|
||||
RUN dotnet restore PluralKit.sln
|
||||
|
||||
# Copy the rest of the code and build
|
||||
|
|
@ -2,7 +2,9 @@ version: "3"
|
|||
|
||||
services:
|
||||
bot:
|
||||
build: .
|
||||
build:
|
||||
context: .
|
||||
dockerfile: ci/Dockerfile.dotnet
|
||||
command: ["bin/PluralKit.Bot.dll"]
|
||||
environment:
|
||||
- "PluralKit__Database=Host=db;Username=postgres;Password=postgres;Database=postgres"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue