Skip to content

Commit

Permalink
chore: add docker
Browse files Browse the repository at this point in the history
  • Loading branch information
oott123 authored Sep 17, 2024
1 parent 0df6cb8 commit 083811e
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 0 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Docker

on:
push:
branches:
- '**'
tags:
- '**'
paths-ignore:
- '/README.md'

jobs:
docker:
runs-on: ubuntu-latest
permissions:
packages: write
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Docker meta
id: meta
uses: docker/metadata-action@v3
with:
images: |
ghcr.io/${{ github.repository }}
tags: |
type=ref,event=branch
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=sha
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to ghcr.io
if: github.event_name != 'pull_request'
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v2
with:
context: .
platforms: linux/amd64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
11 changes: 11 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS builder
COPY "." "/src"
WORKDIR "/src"
RUN dotnet build --configuration Release

FROM ghcr.io/featuredcontainers/wine-dotnet:main
COPY --from=builder /src/bin/Release/net7.0/ /app
ENV WINEARCH=win32
RUN winetricks gdiplus && \
rm -rf /root/.cache
ENTRYPOINT [ "wine" "/dotnet/win32/dotnet.exe" "/app/EorzeaMapExtractor.Cli.dll" ]

0 comments on commit 083811e

Please sign in to comment.