diff --git a/.eslintrc.js b/.eslintrc.js
index 21dabafcd..8f37e1cf2 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -15,20 +15,15 @@ module.exports = {
version: 'detect',
},
linkComponents: [
- {name: 'Link', linkAttribute: 'to'},
- {name: 'NavLink', linkAttribute: 'to'},
+ { name: 'Link', linkAttribute: 'to' },
+ { name: 'NavLink', linkAttribute: 'to' },
],
},
env: {
browser: true,
es6: true,
},
- plugins: [
- 'react',
- 'react-hooks',
- 'prettier',
- '@typescript-eslint',
- ],
+ plugins: ['react', 'react-hooks', 'prettier', '@typescript-eslint'],
extends: [
// 'standard',
'eslint:recommended',
@@ -38,7 +33,7 @@ module.exports = {
],
rules: {
eqeqeq: 'error',
- 'prettier/prettier': ['error', {}, {usePrettierrc: true}],
+ 'prettier/prettier': ['error', {}, { usePrettierrc: true }],
// TypeScript can infer this significantly better than eslint ever can.
'react/prop-types': 0,
'react/display-name': 0,
@@ -51,7 +46,7 @@ module.exports = {
// @see https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-use-before-define.md#how-to-use
'no-use-before-define': 0,
'@typescript-eslint/no-use-before-define': 'warn',
- '@typescript-eslint/no-unused-vars': ['warn', {argsIgnorePattern: '^_', varsIgnorePattern: '^_'}],
- '@typescript-eslint/ban-ts-comment': ['error', {'ts-expect-error': 'allow-with-description'}],
- }
+ '@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^_', varsIgnorePattern: '^_' }],
+ '@typescript-eslint/ban-ts-comment': ['error', { 'ts-expect-error': 'allow-with-description' }],
+ },
};
diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml
index 65cef226d..44c0aad85 100644
--- a/.github/workflows/docker.yaml
+++ b/.github/workflows/docker.yaml
@@ -3,25 +3,36 @@ name: Docker
on:
push:
branches:
- - "develop"
- - "release/v*"
+ - develop
+ - 1.0-develop
+ pull_request:
+ branches:
+ - develop
+ - 1.0-develop
+ release:
+ types:
+ - published
jobs:
push:
name: Push
runs-on: ubuntu-20.04
- # Always run against a tag, even if the commit into the tag has [docker skip]
- # within the commit message.
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
- uses: docker/metadata-action@v4
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
@@ -29,33 +40,28 @@ jobs:
- name: Setup Docker buildx
uses: docker/setup-buildx-action@v2
- - name: Docker login
+ - name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.REGISTRY_TOKEN }}
- - name: Release production build
- uses: docker/build-push-action@v3
- if: "contains(github.ref, 'release/v')"
- with:
- context: .
- file: ./Containerfile
- push: true
- platforms: linux/amd64,linux/arm64
- tags: ${{ steps.docker_meta.outputs.tags }}
- labels: ${{ steps.docker_meta.outputs.labels }}
+ - 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: Release development build
+ - name: Build and Push
uses: docker/build-push-action@v3
- if: "contains(github.ref, 'develop')"
with:
context: .
file: ./Containerfile
push: ${{ github.event_name != 'pull_request' }}
platforms: linux/amd64 #,linux/arm64
- tags: ${{ steps.docker_meta.outputs.tags }}
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/.github/workflows/release.yaml b/.github/workflows/release.yaml
index 7c4a72bff..9c9ad9de9 100644
--- a/.github/workflows/release.yaml
+++ b/.github/workflows/release.yaml
@@ -36,21 +36,19 @@ jobs:
git push -u origin $BRANCH
sed -i "s/ 'version' => 'canary',/ 'version' => '${REF:11}',/" config/app.php
git add config/app.php
- git commit -m "bump version for release"
+ git commit -m "ci(release): bump version"
git push
- name: Create release archive
run: |
- rm -rf node_modules/ tests/ CODE_OF_CONDUCT.md CONTRIBUTING.md phpstan.neon phpunit.xml
- tar -czf panel.tar.gz * .env.example .eslintignore .eslintrc.js
+ rm -rf node_modules tests CODE_OF_CONDUCT.md CONTRIBUTING.md flake.lock flake.nix phpstan.neon phpunit.xml shell.nix
+ tar -czf panel.tar.gz * .editorconfig .env.example .eslintignore .eslintrc.js .gitignore .prettierrc.json
- name: Extract changelog
- id: extract_changelog
env:
REF: ${{ github.ref }}
run: |
sed -n "/^## ${REF:10}/,/^## /{/^## /b;p}" CHANGELOG.md > ./RELEASE_CHANGELOG
- echo ::set-output name=version_name::`sed -nr "s/^## (${REF:10} .*)$/\1/p" CHANGELOG.md`
- name: Create checksum and add to changelog
run: |
@@ -60,15 +58,13 @@ jobs:
- name: Create release
id: create_release
- uses: actions/create-release@v1
+ uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
- tag_name: ${{ github.ref }}
- release_name: ${{ steps.extract_changelog.outputs.version_name }}
- body_path: ./RELEASE_CHANGELOG
draft: true
- prerelease: ${{ contains(github.ref, 'beta') || contains(github.ref, 'alpha') }}
+ prerelease: ${{ contains(github.ref, 'rc') || contains(github.ref, 'beta') || contains(github.ref, 'alpha') }}
+ body_path: ./RELEASE_CHANGELOG
- name: Upload release archive
id: upload-release-archive
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 67fd49fdf..100100347 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -3,6 +3,10 @@ This file is a running track of new features and fixes to each version of the pa
This project follows [Semantic Versioning](http://semver.org) guidelines.
+## v1.11.1
+### Fixed
+* Fixed Panel Docker image showing `canary` as it's version.
+
## v1.11.0
### Changed (since 1.10.4)
* Changed minimum PHP version requirement from `7.4` to `8.0`.
diff --git a/app/Services/Nodes/NodeCreationService.php b/app/Services/Nodes/NodeCreationService.php
index e4946bc20..b21589c4a 100644
--- a/app/Services/Nodes/NodeCreationService.php
+++ b/app/Services/Nodes/NodeCreationService.php
@@ -13,7 +13,7 @@ class NodeCreationService
/**
* NodeCreationService constructor.
*/
- public function __construct(private Encrypter $encrypter, protected NodeRepositoryInterface $repository)
+ public function __construct(protected NodeRepositoryInterface $repository)
{
}
@@ -25,7 +25,7 @@ class NodeCreationService
public function handle(array $data): Node
{
$data['uuid'] = Uuid::uuid4()->toString();
- $data['daemon_token'] = $this->encrypter->encrypt(Str::random(Node::DAEMON_TOKEN_LENGTH));
+ $data['daemon_token'] = app(Encrypter::class)->encrypt(Str::random(Node::DAEMON_TOKEN_LENGTH));
$data['daemon_token_id'] = Str::random(Node::DAEMON_TOKEN_ID_LENGTH);
return $this->repository->create($data, true, true);
diff --git a/resources/scripts/components/server/files/FileManagerStatus.tsx b/resources/scripts/components/server/files/FileManagerStatus.tsx
index 2e1534b41..df296fc47 100644
--- a/resources/scripts/components/server/files/FileManagerStatus.tsx
+++ b/resources/scripts/components/server/files/FileManagerStatus.tsx
@@ -33,7 +33,7 @@ const Spinner = ({ progress, className }: { progress: number; className?: string
const FileUploadList = () => {
const { close } = useContext(DialogWrapperContext);
- const removeFileUpload = ServerContext.useStoreActions(actions => actions.files.removeFileUpload);
+ const cancelFileUpload = ServerContext.useStoreActions(actions => actions.files.cancelFileUpload);
const clearFileUploads = ServerContext.useStoreActions(actions => actions.files.clearFileUploads);
const uploads = ServerContext.useStoreState(state =>
Object.entries(state.files.uploads).sort(([a], [b]) => a.localeCompare(b)),
@@ -50,7 +50,7 @@ const FileUploadList = () => {
{name}