mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
Revert GitHub > Gitlab
This commit is contained in:
parent
e25d6222e3
commit
4880950469
@ -6,7 +6,7 @@ docker-compose.yml
|
|||||||
|
|
||||||
# git & gitlab related
|
# git & gitlab related
|
||||||
.git/
|
.git/
|
||||||
.github/
|
.gitlab/
|
||||||
.gitignore
|
.gitignore
|
||||||
.gitlab-ci.yml
|
.gitlab-ci.yml
|
||||||
|
|
||||||
|
89
.github/workflows/docker-build.yml
vendored
89
.github/workflows/docker-build.yml
vendored
@ -1,89 +0,0 @@
|
|||||||
# yamllint disable rule:line-length
|
|
||||||
---
|
|
||||||
name: Build Docker Images
|
|
||||||
|
|
||||||
on: # yamllint disable-line rule:truthy
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
- dev
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
name: Build Docker Images
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
outputs:
|
|
||||||
date: ${{ steps.date.outputs.date }}
|
|
||||||
tag: ${{ steps.branch.outputs.tag }}
|
|
||||||
version: ${{ steps.version.outputs.version }}
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Check out repository
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Set up QEMU
|
|
||||||
id: qemu
|
|
||||||
uses: docker/setup-qemu-action@v1
|
|
||||||
with:
|
|
||||||
image: tonistiigi/binfmt:latest
|
|
||||||
platforms: all
|
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
|
||||||
id: buildx
|
|
||||||
uses: docker/setup-buildx-action@v1
|
|
||||||
|
|
||||||
- name: Log in to GitHub Container Registry
|
|
||||||
if: github.event_name != 'pull_request'
|
|
||||||
uses: docker/login-action@v1
|
|
||||||
with:
|
|
||||||
registry: ghcr.io
|
|
||||||
username: ${{ github.actor }}
|
|
||||||
password: ${{ secrets.GHCR_PAT }}
|
|
||||||
|
|
||||||
# - name: Login to Docker Hub
|
|
||||||
# if: github.event_name != 'pull_request'
|
|
||||||
# uses: docker/login-action@v1
|
|
||||||
# with:
|
|
||||||
# username: ${{ secrets.DOCKER_USERNAME }}
|
|
||||||
# password: ${{ secrets.DOCKER_PASSWORD }}
|
|
||||||
|
|
||||||
- name: Get current date
|
|
||||||
id: date
|
|
||||||
run: echo "::set-output name=date::$(date +"%Y-%m-%dT%H:%M:%SZ")"
|
|
||||||
|
|
||||||
- name: Get Crafty version
|
|
||||||
id: version
|
|
||||||
run: |
|
|
||||||
MAJOR=$(cat app/config/version.json | jq '.major' )
|
|
||||||
MINOR=$(cat app/config/version.json | jq '.minor' )
|
|
||||||
SUB=$(cat app/config/version.json | jq '.sub' )
|
|
||||||
META=$(cat app/config/version.json | jq -r '.meta' )
|
|
||||||
echo "::set-output name=version::$MAJOR.$MINOR.$SUB-$META"
|
|
||||||
|
|
||||||
- name: Get branch tag
|
|
||||||
id: branch
|
|
||||||
run: |
|
|
||||||
if [[ "${{ github.ref }}" == "refs/heads/master" ]]; then
|
|
||||||
echo "::set-output name=tag::latest"
|
|
||||||
else
|
|
||||||
echo "::set-output name=tag::$(echo "${{ github.ref }}" | sed -e 's/refs\/heads\///g')"
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Build and push Docker image
|
|
||||||
uses: docker/build-push-action@v2
|
|
||||||
with:
|
|
||||||
context: .
|
|
||||||
file: ./Dockerfile
|
|
||||||
platforms: linux/arm64,linux/amd64
|
|
||||||
push: ${{ github.event_name != 'pull_request' }}
|
|
||||||
cache-from: type=registry,ref=${{ github.repository }}:${{ steps.branch.outputs.tag }}
|
|
||||||
cache-to: type=inline
|
|
||||||
build-args: |
|
|
||||||
BUILD_DATE=${{ steps.date.outputs.date }}
|
|
||||||
BUILD_REF=${{ github.sha }}
|
|
||||||
CRAFTY_VER=${{ steps.version.outputs.version }}
|
|
||||||
tags: |
|
|
||||||
ghcr.io/${{ github.repository }}:${{ steps.branch.outputs.tag }}
|
|
||||||
|
|
||||||
# {{ GITHUB_REPOSITORY }}:${{ steps.branch.outputs.tag }}
|
|
37
.github/workflows/lint.yml
vendored
37
.github/workflows/lint.yml
vendored
@ -1,37 +0,0 @@
|
|||||||
# yamllint disable rule:line-length
|
|
||||||
---
|
|
||||||
name: Lint
|
|
||||||
|
|
||||||
on: [push, pull_request] # yamllint disable-line rule:truthy
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
lint:
|
|
||||||
name: Lint
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Set up Python
|
|
||||||
uses: actions/setup-python@v3
|
|
||||||
with:
|
|
||||||
python-version: "3.9"
|
|
||||||
cache: "pip"
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: |
|
|
||||||
python -m pip install --upgrade pip
|
|
||||||
pip install pylint black yamllint
|
|
||||||
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
|
|
||||||
|
|
||||||
- name: Run pylint
|
|
||||||
run: |
|
|
||||||
pylint --output-format=text $(find -type f -name "*.py" ! -path "**/.venv/**" ! -path "**/app/migrations/**") | tee /tmp/pylint.txt
|
|
||||||
echo "pylint score: $(cat /tmp/pylint.txt | grep -oP 'Your code has been rated at \K[0-9]*\.?[0-9]*')"
|
|
||||||
|
|
||||||
- name: Run black
|
|
||||||
run: black --check --diff .
|
|
||||||
|
|
||||||
- name: Lint YAML files
|
|
||||||
run: yamllint .
|
|
72
.github/workflows/pyinstaller-build.yml
vendored
72
.github/workflows/pyinstaller-build.yml
vendored
@ -1,72 +0,0 @@
|
|||||||
# yamllint disable rule:line-length
|
|
||||||
---
|
|
||||||
name: Build pyinstaller apps
|
|
||||||
|
|
||||||
on: # yamllint disable-line rule:truthy
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
- dev
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
name: Build Packages
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
include:
|
|
||||||
- os: macos-latest
|
|
||||||
TARGET: macos
|
|
||||||
CMD_BUILD: |
|
|
||||||
pyinstaller -F main.py --name "crafty4" \
|
|
||||||
--distpath . \
|
|
||||||
--hidden-import cryptography \
|
|
||||||
--hidden-import cffi \
|
|
||||||
--hidden-import apscheduler \
|
|
||||||
--collect-all tzlocal \
|
|
||||||
--collect-all tzdata \
|
|
||||||
--collect-all pytz \
|
|
||||||
--collect-all six
|
|
||||||
chmod +x crafty4
|
|
||||||
tar --exclude='./app/classes/' -cvzf crafty4.tar.gz crafty4 app/
|
|
||||||
OUT_FILE_NAME: crafty4.tar.gz
|
|
||||||
|
|
||||||
- os: windows-latest
|
|
||||||
TARGET: windows
|
|
||||||
CMD_BUILD: |
|
|
||||||
pyinstaller -F main.py --name "crafty4" `
|
|
||||||
--distpath . `
|
|
||||||
--icon app\frontend\static\assets\images\Crafty_4-0_Logo_square.ico `
|
|
||||||
--hidden-import cryptography `
|
|
||||||
--hidden-import cffi `
|
|
||||||
--hidden-import apscheduler `
|
|
||||||
--collect-all tzlocal `
|
|
||||||
--collect-all tzdata `
|
|
||||||
--collect-all pytz `
|
|
||||||
--collect-all six
|
|
||||||
OUT_FILE_NAME: |
|
|
||||||
crafty4.exe
|
|
||||||
app/
|
|
||||||
!app/classes/**/*
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- name: Set up Python
|
|
||||||
uses: actions/setup-python@v3
|
|
||||||
with:
|
|
||||||
python-version: "3.10"
|
|
||||||
cache: "pip"
|
|
||||||
- name: Install Dependencies
|
|
||||||
run: |
|
|
||||||
python -m pip install --upgrade pip
|
|
||||||
pip install pyinstaller
|
|
||||||
pip install -r requirements.txt
|
|
||||||
- name: Build with pyinstaller for ${{matrix.TARGET}}
|
|
||||||
run: ${{matrix.CMD_BUILD}}
|
|
||||||
|
|
||||||
- name: "Upload Artifact"
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: crafty4-${{matrix.TARGET}}
|
|
||||||
path: ${{ matrix.OUT_FILE_NAME}}
|
|
@ -68,6 +68,6 @@ LABEL \
|
|||||||
org.opencontainers.image.description="A Game Server Control Panel / Launcher" \
|
org.opencontainers.image.description="A Game Server Control Panel / Launcher" \
|
||||||
org.opencontainers.image.url="https://craftycontrol.com/" \
|
org.opencontainers.image.url="https://craftycontrol.com/" \
|
||||||
org.opencontainers.image.documentation="https://wiki.craftycontrol.com/" \
|
org.opencontainers.image.documentation="https://wiki.craftycontrol.com/" \
|
||||||
org.opencontainers.image.source="https://github.com/arcadia-technology/crafty-4" \
|
org.opencontainers.image.source="https://gitlab.com/crafty-controller/crafty-4" \
|
||||||
org.opencontainers.image.vendor="Arcadia Technology, LLC." \
|
org.opencontainers.image.vendor="Arcadia Technology, LLC." \
|
||||||
org.opencontainers.image.licenses=""
|
org.opencontainers.image.licenses="GPL-3.0"
|
||||||
|
18
README.md
18
README.md
@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
|
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
|
||||||
[![Supported Python Versions](https://shields.io/badge/python-3.8%20%7C%203.9%20%7C%203.10%20-blue)](https://www.python.org)
|
[![Supported Python Versions](https://shields.io/badge/python-3.8%20%7C%203.9%20%7C%203.10%20-blue)](https://www.python.org)
|
||||||
[![Version(temp-hardcoded)](https://img.shields.io/badge/release-v4.0.0--beta-orange)](https://github.com/arcadia-technology/crafty-4)
|
[![Version(temp-hardcoded)](https://img.shields.io/badge/release-v4.0.0--beta-orange)](https://gitlab.com/crafty-controller/crafty-4)
|
||||||
[![Code Quality(temp-hardcoded)](https://img.shields.io/badge/code%20quality-10-brightgreen)](https://github.com/arcadia-technology/crafty-4)
|
[![Code Quality(temp-hardcoded)](https://img.shields.io/badge/code%20quality-10-brightgreen)](https://gitlab.com/crafty-controller/crafty-4)
|
||||||
[![Build Status](https://github.com/arcadia-technology/crafty-4/actions/workflows/docker-build.yml/badge.svg)](https://github.com/arcadia-technology/crafty-4/actions/workflows/docker-build.yml)
|
[![Build Status](https://gitlab.com/crafty-controller/crafty-4/badges/master/pipeline.svg)](https://gitlab.com/crafty-controller/crafty-4/-/commits/master)
|
||||||
|
|
||||||
# Crafty Controller 4.0.0-beta
|
# Crafty Controller 4.0.0-beta
|
||||||
> Python based Control Panel for your Minecraft Server
|
> Python based Control Panel for your Minecraft Server
|
||||||
@ -23,7 +23,7 @@ Project Homepage - https://craftycontrol.com
|
|||||||
|
|
||||||
Discord Server - https://discord.gg/9VJPhCE
|
Discord Server - https://discord.gg/9VJPhCE
|
||||||
|
|
||||||
Git Repository - https://github.com/arcadia-technology/crafty-4
|
Git Repository - https://gitlab.com/crafty-controller/crafty-4
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
@ -55,11 +55,11 @@ As the Dockerfile uses the permission structure of `crafty:root` **internally**
|
|||||||
### - Using the registry image 🌎
|
### - Using the registry image 🌎
|
||||||
The provided image supports both `arm64` and `amd64` out the box, if you have issues though you can build it yourself with the `compose` file in `docker/`.
|
The provided image supports both `arm64` and `amd64` out the box, if you have issues though you can build it yourself with the `compose` file in `docker/`.
|
||||||
|
|
||||||
The image is located at: `ghcr.io/arcadia-technology/crafty-4:latest`
|
The image is located at: `registry.gitlab.com/crafty-controller/crafty-4:latest`
|
||||||
| Branch | Status |
|
| Branch | Status |
|
||||||
| ----------------- | ------------------------------------------------------------------ |
|
| ----------------- | ------------------------------------------------------------------ |
|
||||||
| :latest | [![Pipeline status](https://github.com/arcadia-technology/crafty-4/actions/workflows/docker-build.yml/badge.svg)](https://github.com/arcadia-technology/crafty-4/actions/workflows/docker-build.yml) |
|
| :latest | [![pipeline status](https://gitlab.com/crafty-controller/crafty-4/badges/master/pipeline.svg)](https://gitlab.com/crafty-controller/crafty-4/-/commits/master) |
|
||||||
| :dev | [![Pipeline status](https://github.com/arcadia-technology/crafty-4/actions/workflows/docker-build.yml/badge.svg?branch=dev)](https://github.com/arcadia-technology/crafty-4/actions/workflows/docker-build.yml) |
|
| :dev | [![pipeline status](https://gitlab.com/crafty-controller/crafty-4/badges/dev/pipeline.svg)](https://gitlab.com/crafty-controller/crafty-4/-/commits/dev)
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
@ -76,7 +76,7 @@ version: '3'
|
|||||||
services:
|
services:
|
||||||
crafty:
|
crafty:
|
||||||
container_name: crafty_container
|
container_name: crafty_container
|
||||||
image: ghcr.io/arcadia-technology/crafty-4:latest
|
image: registry.gitlab.com/crafty-controller/crafty-4:latest
|
||||||
restart: always
|
restart: always
|
||||||
environment:
|
environment:
|
||||||
- TZ=Etc/UTC
|
- TZ=Etc/UTC
|
||||||
@ -115,7 +115,7 @@ $ docker run \
|
|||||||
-v "/$(pwd)/docker/servers:/crafty/servers" \
|
-v "/$(pwd)/docker/servers:/crafty/servers" \
|
||||||
-v "/$(pwd)/docker/config:/crafty/app/config" \
|
-v "/$(pwd)/docker/config:/crafty/app/config" \
|
||||||
-v "/$(pwd)/docker/import:/crafty/import" \
|
-v "/$(pwd)/docker/import:/crafty/import" \
|
||||||
ghcr.io/arcadia-technology/crafty-4:latest
|
registry.gitlab.com/crafty-controller/crafty-4:latest
|
||||||
```
|
```
|
||||||
|
|
||||||
### **Building from the cloned repository:**
|
### **Building from the cloned repository:**
|
||||||
|
Loading…
Reference in New Issue
Block a user