Browse Source

testing dockerbuild

jsc2
Evan Feenstra 4 years ago
parent
commit
f550edb1ca
  1. 14
      .github/workflows/docker-build.yml
  2. 5
      dist/src/utils/connect.js
  3. 2
      dist/src/utils/connect.js.map
  4. 5
      src/utils/connect.ts

14
.github/workflows/docker-build.yml

@ -2,10 +2,15 @@ name: Docker build on push
env: env:
DOCKER_CLI_EXPERIMENTAL: enabled DOCKER_CLI_EXPERIMENTAL: enabled
# on:
# push:
# tags:
# - '*'
on: on:
push: push:
tags: branches:
- '*' - master
jobs: jobs:
build: build:
@ -18,7 +23,7 @@ jobs:
run: echo "::set-env name=HEAD_TAG::$(git tag --points-at HEAD)" run: echo "::set-env name=HEAD_TAG::$(git tag --points-at HEAD)"
- name: Show set env variables - name: Show set env variables
run: | run: |
printf " HEAD_TAG: %s\n" "$HEAD_TAG" printf " HEAD_TAG: %s\n" "${{ env.HEAD_TAG }}"
- name: Login to Docker Hub - name: Login to Docker Hub
run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin
- name: Checkout project - name: Checkout project
@ -39,6 +44,9 @@ jobs:
key: ${{ runner.os }}-buildx-${{ github.sha }} key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: | restore-keys: |
${{ runner.os }}-buildx- ${{ runner.os }}-buildx-
- name: Show set env variables again
run: |
printf " HEAD_TAG: %s\n" "${{ env.HEAD_TAG }}"
- name: Run Docker buildx - name: Run Docker buildx
run: | run: |
docker buildx build \ docker buildx build \

5
dist/src/utils/connect.js

@ -29,8 +29,9 @@ function getQR() {
catch (e) { } catch (e) { }
} }
else { else {
const port = config.node_http_port; // const port = config.node_http_port
theIP = port ? `${ip}:${port}` : ip; // theIP = port ? `${ip}:${port}` : ip
theIP = ip;
} }
} }
return Buffer.from(`ip::${theIP}::${password_1.default || ''}`).toString('base64'); return Buffer.from(`ip::${theIP}::${password_1.default || ''}`).toString('base64');

2
dist/src/utils/connect.js.map

@ -1 +1 @@
{"version":3,"file":"connect.js","sourceRoot":"","sources":["../../../src/utils/connect.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,sCAAqC;AACrC,gDAAwC;AACxC,qCAAmC;AACnC,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;AAExB,MAAM,MAAM,GAAG,mBAAU,EAAE,CAAA;AAE3B,SAAsB,KAAK;;QACzB,IAAI,KAAK,CAAA;QAET,MAAM,UAAU,GAAG,MAAM,CAAC,UAAU,CAAA;QACpC,IAAI,UAAU;YAAE,KAAK,GAAG,UAAU,CAAA;QAElC,IAAI,CAAC,KAAK,EAAE;YACV,MAAM,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC,OAAO,CAAA;YAC9B,IAAI,CAAC,EAAE,EAAE;gBACP,IAAI;oBACF,KAAK,GAAG,MAAM,QAAQ,CAAC,EAAE,EAAE,CAAA;iBAC5B;gBAAC,OAAO,CAAC,EAAE,GAAG;aAChB;iBAAM;gBACL,MAAM,IAAI,GAAG,MAAM,CAAC,cAAc,CAAA;gBAClC,KAAK,GAAG,IAAI,CAAC,CAAC,CAAC,GAAG,EAAE,IAAI,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAA;aACpC;SACF;QACD,OAAO,MAAM,CAAC,IAAI,CAAC,OAAO,KAAK,KAAK,kBAAQ,IAAI,EAAE,EAAE,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAA;IAC1E,CAAC;CAAA;AAlBD,sBAkBC;AAED,SAAsB,OAAO,CAAC,GAAG,EAAE,GAAG;;QACpC,EAAE,CAAC,QAAQ,CAAC,mBAAmB,EAAE,UAAgB,KAAK,EAAE,MAAM;;gBAC5D,IAAI,KAAK,EAAE;oBACT,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;oBACnB,GAAG,CAAC,KAAK,CAAC,wCAAwC,CAAC,CAA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,MAAM,CAAC,IAAI,CAAC,OAAO,KAAK,KAAK,kBAAQ,IAAI,EAAE,EAAE,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAA;IAC1E,CAAC;CAAA;AAnBD,sBAmBC;AAED,SAAsB,OAAO,CAAC,GAAG,EAAE,GAAG;;QACpC,EAAE,CAAC,QAAQ,CAAC,mBAAmB,EAAE,UAAgB,KAAK,EAAE,MAAM;;gBAC5D,IAAI,KAAK,EAAE;oBACT,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;oBACnB,GAAG,CAAC,KAAK,CAAC,wCAAwC,CAAC,CAAC;iBACrD;qBAAM;oBACL,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE,CAAA;oBACjD,MAAM,EAAE,GAAG,MAAM,KAAK,EAAE,CAAA;oBACxB,MAAM,GAAG,GAAG,UAAU,CAAC,OAAO,CAAC,oBAAoB,EAAE,EAAE,CAAC,CAAA;oBACxD,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,MAAM,CAAC,CAAA;oBACtC,GAAG,CAAC,SAAS,CAAC,GAAG,EAAE,EAAE,cAAc,EAAE,WAAW,EAAE,CAAC,CAAC;oBACpD,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;iBAClB;gBACD,GAAG,CAAC,GAAG,EAAE,CAAC;YACZ,CAAC;SAAA,CAAC,CAAC;IACL,CAAC;CAAA;AAfD,0BAeC"}

5
src/utils/connect.ts

@ -18,8 +18,9 @@ export async function getQR():Promise<string> {
theIP = await publicIp.v4() theIP = await publicIp.v4()
} catch (e) { } } catch (e) { }
} else { } else {
const port = config.node_http_port // const port = config.node_http_port
theIP = port ? `${ip}:${port}` : ip // theIP = port ? `${ip}:${port}` : ip
theIP = ip
} }
} }
return Buffer.from(`ip::${theIP}::${password || ''}`).toString('base64') return Buffer.from(`ip::${theIP}::${password || ''}`).toString('base64')

Loading…
Cancel
Save