Compare commits
8 Commits
dev-nightl
...
main
Author | SHA1 | Date | |
---|---|---|---|
3b901d8e6c | |||
9764484f4a | |||
5f781f6f48 | |||
fcd7e18d9b | |||
564d1467f6 | |||
39b780e518 | |||
34e33937e2 | |||
e88e903096 |
32
.github/workflows/docker-build.yaml
vendored
Normal file
32
.github/workflows/docker-build.yaml
vendored
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
name: Build and Push Docker Image to GHCR
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Set repo owner to lowercase
|
||||||
|
run: echo "REPO_OWNER=$(echo ${{ github.repository_owner }} | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- name: Login to GitHub Container Registry
|
||||||
|
uses: docker/login-action@v1
|
||||||
|
with:
|
||||||
|
registry: ghcr.io
|
||||||
|
username: ${{ github.repository_owner }}
|
||||||
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Build and push Docker image to GHCR
|
||||||
|
uses: docker/build-push-action@v2
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
push: true
|
||||||
|
tags: ghcr.io/${{ env.REPO_OWNER }}/ragecoop-v:latest
|
||||||
|
dockerfile: Dockerfile
|
46
.github/workflows/nightly-build.yaml
vendored
46
.github/workflows/nightly-build.yaml
vendored
@ -1,13 +1,11 @@
|
|||||||
name: Nightly-build
|
name: Nightly-build
|
||||||
|
|
||||||
on:
|
on: push
|
||||||
push:
|
|
||||||
branches: [ "dev-nightly" ]
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
|
||||||
runs-on: windows-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
dotnet-version: ['6.0.x']
|
dotnet-version: ['6.0.x']
|
||||||
@ -21,7 +19,10 @@ jobs:
|
|||||||
- name: Restore dependencies
|
- name: Restore dependencies
|
||||||
run: dotnet restore
|
run: dotnet restore
|
||||||
- name: Restore nuget packages
|
- name: Restore nuget packages
|
||||||
run: nuget restore
|
run: |
|
||||||
|
sudo apt update
|
||||||
|
sudo apt install -y nuget
|
||||||
|
nuget restore
|
||||||
- name: Build client and installer
|
- name: Build client and installer
|
||||||
run: dotnet build RageCoop.Client.Installer/RageCoop.Client.Installer.csproj --configuration Release -o bin/Release/Client/RageCoop
|
run: dotnet build RageCoop.Client.Installer/RageCoop.Client.Installer.csproj --configuration Release -o bin/Release/Client/RageCoop
|
||||||
- name: Build server win-x64
|
- name: Build server win-x64
|
||||||
@ -41,37 +42,4 @@ jobs:
|
|||||||
- uses: vimtor/action-zip@v1
|
- uses: vimtor/action-zip@v1
|
||||||
with:
|
with:
|
||||||
files: bin/Release/Server/linux-x64
|
files: bin/Release/Server/linux-x64
|
||||||
dest: RageCoop.Server-linux-x64.zip
|
dest: RageCoop.Server-linux-x64.zip
|
||||||
|
|
||||||
- uses: WebFreak001/deploy-nightly@v1.1.0
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # automatically provided by github actions
|
|
||||||
with:
|
|
||||||
upload_url: https://uploads.github.com/repos/RAGECOOP/RAGECOOP-V/releases/70603992/assets{?name,label}
|
|
||||||
release_id: 70603992
|
|
||||||
asset_path: RageCoop.Client.zip
|
|
||||||
asset_name: RageCoop.Client.zip
|
|
||||||
asset_content_type: application/zip
|
|
||||||
max_releases: 7
|
|
||||||
|
|
||||||
- uses: WebFreak001/deploy-nightly@v1.1.0
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # automatically provided by github actions
|
|
||||||
with:
|
|
||||||
upload_url: https://uploads.github.com/repos/RAGECOOP/RAGECOOP-V/releases/70603992/assets{?name,label}
|
|
||||||
release_id: 70603992
|
|
||||||
asset_path: RageCoop.Server-win-x64.zip
|
|
||||||
asset_name: RageCoop.Server-win-x64.zip
|
|
||||||
asset_content_type: application/zip
|
|
||||||
max_releases: 7
|
|
||||||
|
|
||||||
- uses: WebFreak001/deploy-nightly@v1.1.0
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # automatically provided by github actions
|
|
||||||
with:
|
|
||||||
upload_url: https://uploads.github.com/repos/RAGECOOP/RAGECOOP-V/releases/70603992/assets{?name,label}
|
|
||||||
release_id: 70603992
|
|
||||||
asset_path: RageCoop.Server-linux-x64.zip
|
|
||||||
asset_name: RageCoop.Server-linux-x64.zip
|
|
||||||
asset_content_type: application/zip
|
|
||||||
max_releases: 7
|
|
3
.gitignore
vendored
3
.gitignore
vendored
@ -2,4 +2,5 @@
|
|||||||
**/obj
|
**/obj
|
||||||
**/packages
|
**/packages
|
||||||
**/.vs
|
**/.vs
|
||||||
**/.vscode
|
**/.vscode
|
||||||
|
**/.idea
|
28
Dockerfile
Normal file
28
Dockerfile
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
# Use the official image as a parent image
|
||||||
|
FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base
|
||||||
|
WORKDIR /app
|
||||||
|
EXPOSE 80
|
||||||
|
|
||||||
|
# Use the SDK image to build the app
|
||||||
|
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build-env
|
||||||
|
WORKDIR /src
|
||||||
|
|
||||||
|
# Copy csproj and restore as distinct layers
|
||||||
|
COPY RageCoop.Server/*.csproj ./RageCoop.Server/
|
||||||
|
COPY libs/*.dll ./libs/
|
||||||
|
|
||||||
|
# Assuming RageCoop.Core is a dependency, if not, you can comment out the next line
|
||||||
|
COPY RageCoop.Core/*.csproj ./RageCoop.Core/
|
||||||
|
|
||||||
|
RUN dotnet restore RageCoop.Server/RageCoop.Server.csproj
|
||||||
|
|
||||||
|
# Copy everything else and build
|
||||||
|
COPY . .
|
||||||
|
WORKDIR /src/RageCoop.Server
|
||||||
|
RUN dotnet publish -c Release -o /app
|
||||||
|
|
||||||
|
# Build runtime image
|
||||||
|
FROM base AS final
|
||||||
|
WORKDIR /app
|
||||||
|
COPY --from=build-env /app .
|
||||||
|
ENTRYPOINT ["dotnet", "RageCoop.Server.dll"]
|
13
docker-compose.yml
Normal file
13
docker-compose.yml
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
version: '3.8'
|
||||||
|
|
||||||
|
services:
|
||||||
|
ragecoop-v:
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
ports:
|
||||||
|
- "4499:4499/udp"
|
||||||
|
stdin_open: true
|
||||||
|
tty: true
|
||||||
|
volumes:
|
||||||
|
- ./Settings.xml:/app/Settings.xml
|
Reference in New Issue
Block a user