Update actions
This commit is contained in:
parent
58404b9728
commit
bbec57c3ad
@ -4,4 +4,5 @@
|
|||||||
.gitignore
|
.gitignore
|
||||||
Dockerfile
|
Dockerfile
|
||||||
.dockerignore
|
.dockerignore
|
||||||
|
docker-build.sh
|
||||||
.vs/
|
.vs/
|
||||||
|
45
.github/workflows/build.yml
vendored
45
.github/workflows/build.yml
vendored
@ -1,45 +0,0 @@
|
|||||||
name: dotnet build
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
paths-ignore:
|
|
||||||
- '**.md'
|
|
||||||
- 'Dockerfile'
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: windows-latest
|
|
||||||
env:
|
|
||||||
DOTNET_CLI_TELEMETRY_OPTOUT: 'true'
|
|
||||||
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
submodules: true
|
|
||||||
|
|
||||||
- name: Setup .NET SDK
|
|
||||||
uses: actions/setup-dotnet@v3
|
|
||||||
with:
|
|
||||||
dotnet-version: 7.0
|
|
||||||
|
|
||||||
- name: Download Dalamud
|
|
||||||
run: |
|
|
||||||
Invoke-WebRequest -Uri https://goatcorp.github.io/dalamud-distrib/latest.zip -OutFile latest.zip
|
|
||||||
Expand-Archive -Force latest.zip "$env:AppData\XIVLauncher\addon\Hooks\dev\"
|
|
||||||
|
|
||||||
- id: cache-dependencies
|
|
||||||
uses: actions/cache@v3
|
|
||||||
with:
|
|
||||||
path: ${{ github.workspace }}/.nuget/packages
|
|
||||||
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-nuget-
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: dotnet restore
|
|
||||||
|
|
||||||
- name: Build
|
|
||||||
run: dotnet build --configuration Release --no-restore
|
|
||||||
|
|
||||||
- name: Test
|
|
||||||
run: dotnet test --no-restore --verbosity normal
|
|
||||||
timeout-minutes: 10
|
|
31
.github/workflows/server.yml
vendored
31
.github/workflows/server.yml
vendored
@ -1,31 +0,0 @@
|
|||||||
name: docker build
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
paths:
|
|
||||||
- '.github/workflows/server.yml'
|
|
||||||
- 'Pal.Common/**'
|
|
||||||
- 'Pal.Server/**'
|
|
||||||
- 'Dockerfile'
|
|
||||||
workflow_dispatch: { }
|
|
||||||
permissions:
|
|
||||||
packages: write
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Login to GitHub Package Registry
|
|
||||||
uses: docker/login-action@v1
|
|
||||||
with:
|
|
||||||
registry: ghcr.io
|
|
||||||
username: ${{ github.repository_owner }}
|
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
- name: Build and push
|
|
||||||
uses: docker/build-push-action@v4
|
|
||||||
with:
|
|
||||||
push: true
|
|
||||||
tags: ghcr.io/${{ github.repository_owner }}/palace-pal:latest
|
|
24
.github/workflows/upload-crowdin.yml
vendored
24
.github/workflows/upload-crowdin.yml
vendored
@ -1,24 +0,0 @@
|
|||||||
name: Upload to Crowdin
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
paths:
|
|
||||||
- 'Pal.Client/Properties/*.resx'
|
|
||||||
- 'crowdin.yml'
|
|
||||||
workflow_dispatch: { }
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- name: Crowdin Action
|
|
||||||
uses: crowdin/github-action@1.4.9
|
|
||||||
with:
|
|
||||||
upload_sources: true
|
|
||||||
upload_translations: true
|
|
||||||
download_translations: false
|
|
||||||
crowdin_branch_name: ${{ github.ref_name }}
|
|
||||||
env:
|
|
||||||
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
|
|
||||||
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
|
|
14
Dockerfile
14
Dockerfile
@ -1,13 +1,19 @@
|
|||||||
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build-env
|
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0-preview AS build-env
|
||||||
|
ARG TARGETARCH
|
||||||
WORKDIR /build
|
WORKDIR /build
|
||||||
COPY Pal.Common/Pal.Common.csproj Pal.Common/
|
COPY Pal.Common/Pal.Common.csproj Pal.Common/
|
||||||
COPY Pal.Server/Pal.Server.csproj Pal.Server/
|
COPY Pal.Server/Pal.Server.csproj Pal.Server/
|
||||||
RUN dotnet restore Pal.Server/Pal.Server.csproj
|
RUN dotnet restore Pal.Server/Pal.Server.csproj -a $TARGETARCH
|
||||||
|
|
||||||
COPY . ./
|
COPY . ./
|
||||||
RUN dotnet publish Pal.Server/Pal.Server.csproj --configuration Release --no-restore -o /dist
|
RUN dotnet publish Pal.Server/Pal.Server.csproj -a $TARGETARCH --no-restore -o /dist
|
||||||
|
|
||||||
|
FROM mcr.microsoft.com/dotnet/aspnet:8.0-preview
|
||||||
|
|
||||||
|
# fix later
|
||||||
|
ENV DOTNET_ROLL_FORWARD=Major
|
||||||
|
ENV DOTNET_ROLL_FORWARD_PRE_RELEASE=1
|
||||||
|
|
||||||
FROM mcr.microsoft.com/dotnet/aspnet:7.0 AS runtime
|
|
||||||
EXPOSE 5415
|
EXPOSE 5415
|
||||||
ENV DOTNET_ENVIRONMENT=Production
|
ENV DOTNET_ENVIRONMENT=Production
|
||||||
ENV ASPNETCORE_URLS=
|
ENV ASPNETCORE_URLS=
|
||||||
|
3
docker-build.sh
Executable file
3
docker-build.sh
Executable file
@ -0,0 +1,3 @@
|
|||||||
|
git fetch origin master
|
||||||
|
git reset --hard origin/master
|
||||||
|
docker buildx build -t git.carvel.li/liza/palacepal/server --platform linux/amd64,linux/arm64 --push .
|
Loading…
Reference in New Issue
Block a user