Add Discordbot docker builds (#87)

* Add BiblioTech Docker builds

https://github.com/codex-storage/infra-codex/issues/113

* Organize workflows

https://github.com/codex-storage/infra-codex/issues/113
This commit is contained in:
Slava 2023-12-15 14:07:52 +02:00 committed by GitHub
parent d67ddab290
commit fd540a53b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 39 additions and 4 deletions

28
.github/workflows/docker-discordbot.yml vendored Normal file
View File

@ -0,0 +1,28 @@
name: Docker - Discord Bot
on:
push:
branches:
- master
tags:
- 'v*.*.*'
paths:
- Tools/BiblioTech
- '!Tools/BiblioTech/docker/docker-compose.yaml'
- Framework
- ProjectPlugins
- .github/workflows/docker-discordbot.yml
- .github/workflows/docker-reusable.yml
workflow_dispatch:
jobs:
build-and-push:
name: Build and Push
uses: ./.github/workflows/docker-reusable.yml
with:
docker_file: Tools/BiblioTech/docker/Dockerfile
docker_repo: codexstorage/codex-discordbot
secrets: inherit

View File

@ -1,4 +1,4 @@
name: Docker
name: Docker - Runner
on:
@ -10,7 +10,7 @@ on:
paths:
- docker/Dockerfile
- docker/docker-entrypoint.sh
- .github/workflows/docker.yml
- .github/workflows/docker-runner.yml
- .github/workflows/docker-reusable.yml
workflow_dispatch:

View File

@ -1,7 +1,14 @@
FROM mcr.microsoft.com/dotnet/sdk:7.0
# Variables
ARG IMAGE=mcr.microsoft.com/dotnet/sdk:7.0
ARG APP_HOME=/app
WORKDIR app
# Create
FROM ${IMAGE}
ARG APP_HOME
WORKDIR ${APP_HOME}
COPY ./Tools/BiblioTech ./Tools/BiblioTech
COPY ./Framework ./Framework
COPY ./ProjectPlugins ./ProjectPlugins
CMD ["dotnet", "run", "--project", "Tools/BiblioTech"]