```工作流更新与设备信息添加
Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 2s

- 重构`.gitea/workflows/build-test.yaml`,优化Maven构建流程,省略非必要步骤。
- 实现`device.json`文件,模拟设备信息,适用于mirai设备。
- 更新`Dockerfile`,自动化构建流程,包括必要的配置文件。
```
This commit is contained in:
Grand-cocoa 2024-09-18 17:25:48 +08:00
parent fc65e875e2
commit ee6403eb7d
3 changed files with 42 additions and 11 deletions

View File

@ -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

10
Dockerfile Normal file
View File

@ -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"]

30
device.json Normal file
View File

@ -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": "<unknown ssid>",
"imsiMd5": "53763c791f940fddcb65d09ed3700272",
"imei": "867739141234828",
"apn": "wifi",
"androidId": "aa28d5bd4d1d1822"
}
}