From ee6403eb7de292e70da149a96b49f80546d1e8ca Mon Sep 17 00:00:00 2001 From: Grand-cocoa <1075576561@qq.com49111108+grand-cocoa@users.noreply.github.com> Date: Wed, 18 Sep 2024 17:25:48 +0800 Subject: [PATCH] =?UTF-8?q?```=E5=B7=A5=E4=BD=9C=E6=B5=81=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E4=B8=8E=E8=AE=BE=E5=A4=87=E4=BF=A1=E6=81=AF=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 重构`.gitea/workflows/build-test.yaml`,优化Maven构建流程,省略非必要步骤。 - 实现`device.json`文件,模拟设备信息,适用于mirai设备。 - 更新`Dockerfile`,自动化构建流程,包括必要的配置文件。 ``` --- .gitea/workflows/build-test.yaml | 13 ++----------- Dockerfile | 10 ++++++++++ device.json | 30 ++++++++++++++++++++++++++++++ 3 files changed, 42 insertions(+), 11 deletions(-) create mode 100644 Dockerfile create mode 100644 device.json diff --git a/.gitea/workflows/build-test.yaml b/.gitea/workflows/build-test.yaml index cbb589f..d4e9735 100644 --- a/.gitea/workflows/build-test.yaml +++ b/.gitea/workflows/build-test.yaml @@ -6,14 +6,5 @@ jobs: Explore-Gitea-Actions: runs-on: ubuntu-latest steps: - - run: echo "🎉 The job was automatically triggered by a ${{ gitea.event_name }} event." - - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by Gitea!" - - run: echo "🔎 The name of your branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}." - - name: Check out repository code - uses: actions/checkout@v4 - - run: echo "💡 The ${{ gitea.repository }} repository has been cloned to the runner." - - run: echo "🖥️ The workflow is now ready to test your code on the runner." - - name: List files in the repository - run: | - ls ${{ gitea.workspace }} - - run: echo "🍏 This job's status is ${{ job.status }}." + - run: mvnw -DskipTests=true clean package -P prod + - run: docker build -t mirai-bot:latest diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..83c7716 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,10 @@ +FROM bellsoft/liberica-openjdk-debian:17.0.11-cds +LABEL authors="Kane" + +ENTRYPOINT ["top", "-b"] + +ADD target/spring-boot-docker-0.0.1-SNAPSHOT.jar /opt/spring-boot-docker.jar +ADD android_pad.json /opt +ADD device.json /opt +ADD KFCFactory.json /opt +CMD ["java", "-jar", "/opt/spring-boot-docker.jar"] diff --git a/device.json b/device.json new file mode 100644 index 0000000..cfb7c9e --- /dev/null +++ b/device.json @@ -0,0 +1,30 @@ +{ + "deviceInfoVersion": 3, + "data": { + "display": "MIRAI.056598.001", + "product": "mirai", + "device": "mirai", + "board": "mirai", + "brand": "mamoe", + "model": "mirai", + "bootloader": "unknown", + "fingerprint": "mamoe/mirai/mirai:10/MIRAI.200122.001/9082187:user/release-keys", + "bootId": "26692CCB-72A7-BF68-942E-0D435E0ACE47", + "procVersion": "Linux version 3.0.31-8RRLhiT0 (android-build@xxx.xxx.xxx.xxx.com)", + "baseBand": "", + "version": { + "incremental": "5891938", + "release": "10", + "codename": "REL" + }, + "simInfo": "T-Mobile", + "osType": "android", + "macAddress": "02:00:00:00:00:00", + "wifiBSSID": "02:00:00:00:00:00", + "wifiSSID": "", + "imsiMd5": "53763c791f940fddcb65d09ed3700272", + "imei": "867739141234828", + "apn": "wifi", + "androidId": "aa28d5bd4d1d1822" + } +}