From e00c6f84d0f9f2387022036b171307374b923f5f Mon Sep 17 00:00:00 2001 From: YuCat <66810215+YuCat-OVO@users.noreply.github.com> Date: Sun, 5 May 2024 20:30:05 +0800 Subject: [PATCH] Test --- .github/workflows/test.yml | 4 ++-- Dockerfile | 1 + Dockerfile.arm64 | 1 + docker.yml | 31 ------------------------------- root/usr/bin/mytest | 9 +++++++++ 5 files changed, 13 insertions(+), 33 deletions(-) delete mode 100644 docker.yml create mode 100644 root/usr/bin/mytest diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 664f39c..b585372 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -49,8 +49,8 @@ jobs: push: true targets: ${{ steps.set-vars.outputs.TARGET }} env: - TAG: ${{ env.BUILD_TAG }} + TAG: ${{ env.BUILD_TAG }}-${{ steps.set-vars.outputs.TARGET }} - name: Test run: | - docker run -t --rm ${{ env.BUILD_TAG }} + docker run -t --rm "${{ env.BUILD_TAG }}-${{ steps.set-vars.outputs.TARGET }}" /usr/bin/mytest diff --git a/Dockerfile b/Dockerfile index 72a3a49..adf34c8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -44,6 +44,7 @@ RUN \ fi \ done && \ dpkg -i /tmp/baidunetdisk.deb && \ + chmod +x /usr/bin/mytest && \ echo "**** cleanup ****" && \ apt-get clean && \ rm -rf \ diff --git a/Dockerfile.arm64 b/Dockerfile.arm64 index b230969..92010de 100644 --- a/Dockerfile.arm64 +++ b/Dockerfile.arm64 @@ -45,6 +45,7 @@ RUN \ fi \ done && \ dpkg -i /tmp/baidunetdisk.deb && \ + chmod +x /usr/bin/mytest && \ echo "**** cleanup ****" && \ apt-get clean && \ rm -rf \ diff --git a/docker.yml b/docker.yml deleted file mode 100644 index 6c3f66c..0000000 --- a/docker.yml +++ /dev/null @@ -1,31 +0,0 @@ -input: - job: - package-manager: docker - allowed-updates: - - update-type: all - source: - provider: github - repo: YuCat-OVO/BaiduNetdisk-Docker - directory: / - branch: develop - commit: 16164b19aa9c08da55b0bd26fb4b2228262d0eab -output: - - type: update_dependency_list - expect: - data: - dependencies: - - name: linuxserver/baseimage-kasmvnc - requirements: - - file: Dockerfile - groups: [] - requirement: null - source: - registry: ghcr.io - tag: debianbookworm - version: debianbookworm - dependency_files: - - /Dockerfile - - type: mark_as_processed - expect: - data: - base-commit-sha: 16164b19aa9c08da55b0bd26fb4b2228262d0eab diff --git a/root/usr/bin/mytest b/root/usr/bin/mytest new file mode 100644 index 0000000..6545aeb --- /dev/null +++ b/root/usr/bin/mytest @@ -0,0 +1,9 @@ +#!/usr/bin/with-contenv bash +# shellcheck shell=bash + +sudo -u root -s /bin/bash -c "/opt/baidunetdisk/baidunetdisk --no-sandbox" > /tmp/baidunetdisk_output.txt 2>&1 & +sleep 15 + +echo -e '\033[0;31m' +cat /tmp/baidunetdisk_output.txt +echo -e '\033[0m'