diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml deleted file mode 100644 index ffa30b349..000000000 --- a/.github/workflows/docker.yaml +++ /dev/null @@ -1,68 +0,0 @@ -name: Docker - -on: - push: - branches: - - develop - - 1.0-develop - pull_request: - branches: - - develop - - 1.0-develop - release: - types: - - published - -jobs: - push: - name: Push - runs-on: ubuntu-20.04 - if: "!contains(github.ref, 'develop') || (!contains(github.event.head_commit.message, 'skip docker') && !contains(github.event.head_commit.message, 'docker skip'))" - steps: - - name: Code checkout - uses: actions/checkout@v3 - - - name: Docker metadata - id: docker_meta - uses: docker/metadata-action@v4 - with: - images: ghcr.io/pterodactyl/panel - flavor: | - latest=false - tags: | - type=raw,value=latest,enable=${{ github.event_name == 'release' && github.event.action == 'published' && github.event.release.prerelease == false }} - type=ref,event=tag - type=ref,event=branch - - - name: Setup QEMU - uses: docker/setup-qemu-action@v2 - - - name: Setup Docker buildx - uses: docker/setup-buildx-action@v2 - - - name: Login to GitHub Container Registry - uses: docker/login-action@v2 - if: "github.event_name != 'pull_request'" - with: - registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.REGISTRY_TOKEN }} - - - name: Update version - if: "github.event_name == 'release' && github.event.action == 'published'" - env: - REF: ${{ github.event.release.tag_name }} - run: | - sed -i "s/ 'version' => 'canary',/ 'version' => '${REF:1}',/" config/app.php - - - name: Build and Push - uses: docker/build-push-action@v4 - with: - context: . - file: ./Dockerfile - push: ${{ github.event_name != 'pull_request' }} - platforms: linux/amd64,linux/arm64 - labels: ${{ steps.docker_meta.outputs.labels }} - tags: ${{ steps.docker_meta.outputs.tags }} - cache-from: type=gha - cache-to: type=gha,mode=max diff --git a/app/Http/Controllers/Api/Remote/Servers/ServerInstallController.php b/app/Http/Controllers/Api/Remote/Servers/ServerInstallController.php index 4ee5ac8f5..36ae2905f 100644 --- a/app/Http/Controllers/Api/Remote/Servers/ServerInstallController.php +++ b/app/Http/Controllers/Api/Remote/Servers/ServerInstallController.php @@ -2,7 +2,6 @@ namespace App\Http\Controllers\Api\Remote\Servers; -use Illuminate\Http\Request; use Illuminate\Http\Response; use App\Models\Server; use Illuminate\Http\JsonResponse; diff --git a/app/Models/Model.php b/app/Models/Model.php index c3ed88a36..6846dfd42 100644 --- a/app/Models/Model.php +++ b/app/Models/Model.php @@ -2,10 +2,8 @@ namespace App\Models; -use Carbon\CarbonImmutable; use Illuminate\Support\Arr; use Illuminate\Support\Str; -use Illuminate\Support\Carbon; use Illuminate\Validation\Rule; use Illuminate\Container\Container; use Illuminate\Validation\ValidationException; diff --git a/app/Models/Server.php b/app/Models/Server.php index d5a0870cf..1e0f15adc 100644 --- a/app/Models/Server.php +++ b/app/Models/Server.php @@ -7,7 +7,6 @@ use GuzzleHttp\Exception\GuzzleException; use GuzzleHttp\Exception\TransferException; use Illuminate\Notifications\Notifiable; use Illuminate\Database\Query\JoinClause; -use Illuminate\Support\Collection; use Illuminate\Support\Facades\Http; use Psr\Http\Message\ResponseInterface; use Znck\Eloquent\Traits\BelongsToThrough; @@ -326,7 +325,7 @@ class Server extends Model public function resolveRouteBinding($value, $field = null): ?self { - return match($field) { + return match ($field) { 'uuid' => $this->where('uuidShort', $value)->orWhere('uuid', $value)->firstOrFail(), default => $this->where('id', $value)->firstOrFail(), };