mirror of
https://github.com/whyour/qinglong.git
synced 2025-05-29 20:26:11 +08:00
修复置顶后编辑置顶消失
This commit is contained in:
parent
fd2b4fb86d
commit
40bf07d2a4
24
.github/workflows/docker.yml
vendored
24
.github/workflows/docker.yml
vendored
|
@ -1,13 +1,6 @@
|
||||||
name: PublishDockerImage
|
name: PublishDockerImage
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
# workflow_run:
|
|
||||||
# workflows:
|
|
||||||
# - BuildStatic
|
|
||||||
# branches:
|
|
||||||
# - master
|
|
||||||
# types:
|
|
||||||
# - completed
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
@ -36,3 +29,20 @@ jobs:
|
||||||
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
|
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||||
run: |
|
run: |
|
||||||
docker buildx build --build-arg SSH_PRIVATE_KEY="${SSH_PRIVATE_KEY}" --output "type=image,push=true" --platform=linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x --tag whyour/qinglong:latest docker/
|
docker buildx build --build-arg SSH_PRIVATE_KEY="${SSH_PRIVATE_KEY}" --output "type=image,push=true" --platform=linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x --tag whyour/qinglong:latest docker/
|
||||||
|
|
||||||
|
- name: Replace tag without `v`
|
||||||
|
if: startsWith(github.ref, 'refs/tags/')
|
||||||
|
uses: actions/github-script@v1
|
||||||
|
id: version
|
||||||
|
with:
|
||||||
|
script: |
|
||||||
|
return context.payload.ref.replace(/\/?refs\/tags\/v/, '')
|
||||||
|
result-encoding: string
|
||||||
|
|
||||||
|
- name: Docker buildx image and push on release
|
||||||
|
env:
|
||||||
|
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||||
|
if: startsWith(github.ref, 'refs/tags/')
|
||||||
|
run: |
|
||||||
|
docker buildx build --build-arg SSH_PRIVATE_KEY="${SSH_PRIVATE_KEY}" --output "type=image,push=true" --platform=linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x --tag whyour/qinglong:${{steps.version.outputs.result}} docker/
|
||||||
|
docker buildx build --build-arg SSH_PRIVATE_KEY="${SSH_PRIVATE_KEY}" --output "type=image,push=true" --platform=linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x --tag whyour/qinglong:latest docker/
|
||||||
|
|
|
@ -11,6 +11,7 @@ export class Crontab {
|
||||||
pid?: number;
|
pid?: number;
|
||||||
isDisabled?: 1 | 0;
|
isDisabled?: 1 | 0;
|
||||||
log_path?: string;
|
log_path?: string;
|
||||||
|
isPinned?: 1 | 0;
|
||||||
|
|
||||||
constructor(options: Crontab) {
|
constructor(options: Crontab) {
|
||||||
this.name = options.name;
|
this.name = options.name;
|
||||||
|
@ -27,6 +28,7 @@ export class Crontab {
|
||||||
this.pid = options.pid;
|
this.pid = options.pid;
|
||||||
this.isDisabled = options.isDisabled || 0;
|
this.isDisabled = options.isDisabled || 0;
|
||||||
this.log_path = options.log_path || '';
|
this.log_path = options.log_path || '';
|
||||||
|
this.isPinned = options.isPinned || 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -12,6 +12,10 @@ export default async ({ server }: { server: Server }) => {
|
||||||
const sockService = Container.get(SockService);
|
const sockService = Container.get(SockService);
|
||||||
|
|
||||||
echo.on('connection', (conn) => {
|
echo.on('connection', (conn) => {
|
||||||
|
if (!conn.headers || !conn.url || !conn.pathname) {
|
||||||
|
conn.close('404');
|
||||||
|
}
|
||||||
|
|
||||||
const data = fs.readFileSync(config.authConfigFile, 'utf8');
|
const data = fs.readFileSync(config.authConfigFile, 'utf8');
|
||||||
const platform = getPlatform(conn.headers['user-agent'] || '') || 'desktop';
|
const platform = getPlatform(conn.headers['user-agent'] || '') || 'desktop';
|
||||||
const headerToken = conn.url.replace(`${conn.pathname}?token=`, '');
|
const headerToken = conn.url.replace(`${conn.pathname}?token=`, '');
|
||||||
|
@ -31,7 +35,7 @@ export default async ({ server }: { server: Server }) => {
|
||||||
|
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
conn.write(JSON.stringify({ type: 'ping', message: '404' }));
|
conn.write(JSON.stringify({ type: 'ping', message: 'whyour' }));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user