File tree Expand file tree Collapse file tree 6 files changed +52
-47
lines changed Expand file tree Collapse file tree 6 files changed +52
-47
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -3,20 +3,23 @@ name: Release
3
3
on :
4
4
push :
5
5
tags :
6
- - " v*"
6
+ - " v*.*.* "
7
7
8
8
jobs :
9
- Builds :
9
+ ReleaseAssets :
10
10
runs-on : ubuntu-latest
11
11
12
12
steps :
13
13
- name : Get the version
14
14
id : get_version
15
15
run : echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
16
16
- uses : actions/checkout@v2
17
- - run : docker build . -f builder/Dockerfile -t builder:latest
18
- - run : docker run --name=gdutils --rm -dit builder:latest bash
19
- - run : docker cp gdutils:/builder/ ./
17
+ - name : Docker Build
18
+ run : docker build . -f builder/Dockerfile -t builder:latest
19
+ - name : Run the Docker image
20
+ run : docker run --name=gdutils --rm -dit builder:latest bash
21
+ - name : Copy Built files
22
+ run : docker cp gdutils:/builder/ ./
20
23
- name : Compress Build Outputs
21
24
run : |
22
25
cd builder
35
38
name : GD-Utils Build ${{ steps.get_version.outputs.VERSION }}
36
39
files : |
37
40
builder/build/gdutils.tar.gz
41
+ DockerImage :
42
+ runs-on : ubuntu-latest
43
+ steps :
44
+ - name : Checkout
45
+ uses : actions/checkout@v2
46
+ - name : Docker meta
47
+ id : meta
48
+ uses : docker/metadata-action@v3
49
+ with :
50
+ images : ghcr.io/nenokkadine/gdutils
51
+ - name : Login to GitHub Container Registry
52
+ uses : docker/login-action@v1
53
+ with :
54
+ registry : ghcr.io
55
+ username : token
56
+ password : ${{ secrets.GH_TOKEN }}
57
+ - name : Build and push
58
+ uses : docker/build-push-action@v2
59
+ with :
60
+ context : .
61
+ file : baseimage/Dockerfile
62
+ platforms : linux/amd64
63
+ push : true
64
+ tags : ${{ steps.meta.outputs.tags }}
65
+ labels : ${{ steps.meta.outputs.labels }}
Original file line number Diff line number Diff line change @@ -10,8 +10,6 @@ RUN apk update && \
10
10
tar \
11
11
unzip \
12
12
xz \
13
- neofetch \
14
- htop \
15
13
bash && \
16
- mkdir /gdutils
14
+ mkdir /gdutils && chmod 777 /gdutils
17
15
WORKDIR /gdutils
Original file line number Diff line number Diff line change @@ -35,9 +35,9 @@ node server.js &
35
35
36
36
# HTTPS Auth
37
37
if [[ -n " $HTTP_USER " && -n " $HTTP_PASS " ]]; then
38
- wget -qO- https://gist.github.com/nenokkadine/5db0fff9216fcedc0dd5862d0a5ab864/raw/95cabcaaf776e47ebb1990b2583f443171cf742a /caddyauth | sed -e " s/\$ HTTP_USER/$HTTP_USER /g" -e " s/\$ HASHPASS/$( caddy hash-password --plaintext $HTTP_PASS ) /g" > /Caddyfile
38
+ wget -qO- https://gist.github.com/nenokkadine/5db0fff9216fcedc0dd5862d0a5ab864/raw/4dd7e7b8edb691fc77a78cc174e88baab4ff073c /caddyauth | sed -e " s/\$ HTTP_USER/$HTTP_USER /g" -e " s/\$ HASHPASS/$( caddy hash-password --plaintext $HTTP_PASS ) /g" > /Caddyfile
39
39
else
40
- wget -q https://gist.github.com/nenokkadine/5db0fff9216fcedc0dd5862d0a5ab864/raw/95cabcaaf776e47ebb1990b2583f443171cf742a /caddynoauth -O /Caddyfile
40
+ wget -q https://gist.github.com/nenokkadine/5db0fff9216fcedc0dd5862d0a5ab864/raw/4dd7e7b8edb691fc77a78cc174e88baab4ff073c /caddynoauth -O /Caddyfile
41
41
fi
42
42
43
43
# Terminal over Web
Original file line number Diff line number Diff line change 1
1
{
2
- "name" : " gd-utils " ,
3
- "version" : " 1.0.1 " ,
4
- "description" : " google drive utils " ,
2
+ "name" : " GD-Utils " ,
3
+ "version" : " 1.0.2 " ,
4
+ "description" : " Google Drive Utils " ,
5
5
"repository" : " iwestlin/gd-utils" ,
6
- "main" : " src/gd.js" ,
7
- "scripts" : {
8
- "start" : " https_proxy='http://127.0.0.1:1086' nodemon server.js" ,
9
- "test" : " echo \" Error: no test specified\" && exit 1"
10
- },
11
6
"keywords" : [],
12
7
"author" : " viegg" ,
13
8
"license" : " ISC" ,
14
9
"dependencies" : {
15
10
"@koa/router" : " ^10.0.0" ,
16
11
"@viegg/axios" : " ^1.0.0" ,
17
- "better-sqlite3" : " ^7.1.5 " ,
12
+ "better-sqlite3" : " ^7.4.1 " ,
18
13
"bytes" : " ^3.1.0" ,
19
14
"cli-table3" : " ^0.6.0" ,
20
15
"colors" : " ^1.4.0" ,
21
- "dayjs" : " ^1.10.4 " ,
22
- "gtoken" : " ^5.2.1 " ,
16
+ "dayjs" : " ^1.10.5 " ,
17
+ "gtoken" : " ^5.3.0 " ,
23
18
"html-escaper" : " ^3.0.3" ,
24
19
"https-proxy-agent" : " ^5.0.0" ,
25
20
"koa" : " ^2.13.1" ,
28
23
"prompts" : " ^2.4.1" ,
29
24
"proxy-agent" : " ^4.0.1" ,
30
25
"signal-exit" : " ^3.0.3" ,
31
- "yargs" : " ^16.2.0 "
26
+ "yargs" : " ^17.0.1 "
32
27
}
33
28
}
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ const dayjs = require('dayjs')
2
2
const Koa = require ( 'koa' )
3
3
const bodyParser = require ( 'koa-bodyparser' )
4
4
const router = require ( './src/router' )
5
+ var fs = require ( 'fs' ) ;
5
6
6
7
const app = new Koa ( )
7
8
app . proxy = true
@@ -11,8 +12,13 @@ app.use(bodyParser())
11
12
app . use ( router . routes ( ) )
12
13
app . use ( router . allowedMethods ( ) )
13
14
14
- const PRT = 23333
15
- app . listen ( PRT , '0.0.0.0' , console . log ( 'http://127.0.0.1:' + PRT ) )
15
+ const G_SOCK = "/usr/gdutils.sock"
16
+
17
+ if ( fs . existsSync ( G_SOCK ) ) {
18
+ fs . unlinkSync ( G_SOCK )
19
+ }
20
+
21
+ app . listen ( G_SOCK , '0.0.0.0' )
16
22
17
23
async function catcher ( ctx , next ) {
18
24
try {
@@ -22,4 +28,4 @@ async function catcher (ctx, next) {
22
28
ctx . status = 500
23
29
ctx . body = e . message
24
30
}
25
- }
31
+ }
You can’t perform that action at this time.
0 commit comments