mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2026-02-14 07:43:31 -07:00
Re-add the Docker build job on GitHub Actions
This commit is contained in:
parent
72bb886a5e
commit
e261edde8b
24
.github/workflows/docker.yml
vendored
24
.github/workflows/docker.yml
vendored
|
|
@ -3,6 +3,30 @@ name: docker
|
||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Install Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v2
|
||||||
|
|
||||||
|
- name: Build image
|
||||||
|
run: >
|
||||||
|
docker buildx build
|
||||||
|
--file DiscordChatExporter.Cli.dockerfile
|
||||||
|
--platform linux/amd64,linux/arm64
|
||||||
|
--output docker/
|
||||||
|
.
|
||||||
|
|
||||||
|
- name: Upload artifacts
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: DiscordChatExporter.Cli.Docker
|
||||||
|
path: docker/
|
||||||
|
|
||||||
deploy-latest:
|
deploy-latest:
|
||||||
if: ${{ github.event_name == 'push' && github.ref_type == 'branch' && github.ref_name == 'master' }}
|
if: ${{ github.event_name == 'push' && github.ref_type == 'branch' && github.ref_name == 'master' }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
|
||||||
8
.github/workflows/main.yml
vendored
8
.github/workflows/main.yml
vendored
|
|
@ -59,26 +59,26 @@ jobs:
|
||||||
- name: Publish (CLI)
|
- name: Publish (CLI)
|
||||||
run: >
|
run: >
|
||||||
dotnet publish DiscordChatExporter.Cli
|
dotnet publish DiscordChatExporter.Cli
|
||||||
--output DiscordChatExporter.Cli/bin/Publish/
|
--output DiscordChatExporter.Cli/publish/
|
||||||
--configuration Release
|
--configuration Release
|
||||||
|
|
||||||
- name: Publish (GUI)
|
- name: Publish (GUI)
|
||||||
run: >
|
run: >
|
||||||
dotnet publish DiscordChatExporter.Gui
|
dotnet publish DiscordChatExporter.Gui
|
||||||
--output DiscordChatExporter.Gui/bin/Publish/
|
--output DiscordChatExporter.Gui/publish/
|
||||||
--configuration Release
|
--configuration Release
|
||||||
|
|
||||||
- name: Upload artifacts (CLI)
|
- name: Upload artifacts (CLI)
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: DiscordChatExporter.Cli
|
name: DiscordChatExporter.Cli
|
||||||
path: DiscordChatExporter.Cli/bin/Publish/
|
path: DiscordChatExporter.Cli/publish/
|
||||||
|
|
||||||
- name: Upload artifacts (GUI)
|
- name: Upload artifacts (GUI)
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: DiscordChatExporter
|
name: DiscordChatExporter
|
||||||
path: DiscordChatExporter.Gui/bin/Publish/
|
path: DiscordChatExporter.Gui/publish/
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
if: ${{ github.event_name == 'push' && github.ref_type == 'tag' }}
|
if: ${{ github.event_name == 'push' && github.ref_type == 'tag' }}
|
||||||
|
|
|
||||||
|
|
@ -14,11 +14,11 @@ ARG TARGETARCH
|
||||||
|
|
||||||
WORKDIR /build
|
WORKDIR /build
|
||||||
|
|
||||||
COPY favicon.ico ./
|
COPY favicon.ico .
|
||||||
COPY NuGet.config ./
|
COPY NuGet.config .
|
||||||
COPY Directory.Build.props ./
|
COPY Directory.Build.props .
|
||||||
COPY DiscordChatExporter.Core ./DiscordChatExporter.Core
|
COPY DiscordChatExporter.Core DiscordChatExporter.Core
|
||||||
COPY DiscordChatExporter.Cli ./DiscordChatExporter.Cli
|
COPY DiscordChatExporter.Cli DiscordChatExporter.Cli
|
||||||
|
|
||||||
# Publish a self-contained assembly so we can use a slimmer runtime image
|
# Publish a self-contained assembly so we can use a slimmer runtime image
|
||||||
RUN dotnet publish DiscordChatExporter.Cli \
|
RUN dotnet publish DiscordChatExporter.Cli \
|
||||||
|
|
@ -26,7 +26,7 @@ RUN dotnet publish DiscordChatExporter.Cli \
|
||||||
--self-contained \
|
--self-contained \
|
||||||
--use-current-runtime \
|
--use-current-runtime \
|
||||||
--arch $TARGETARCH \
|
--arch $TARGETARCH \
|
||||||
--output ./publish
|
--output publish/
|
||||||
|
|
||||||
# -- Run
|
# -- Run
|
||||||
# Use `runtime-deps` instead of `runtime` because we have a self-contained assembly
|
# Use `runtime-deps` instead of `runtime` because we have a self-contained assembly
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue