add docker (broken

This commit is contained in:
Simplxs 2024-05-08 18:44:47 +08:00
parent 9eddf2f02d
commit e796e13e6f
No known key found for this signature in database
GPG Key ID: E23537FF14DD6507
3 changed files with 63 additions and 1 deletions

38
.github/workflows/docker-publish.yml vendored Normal file
View File

@ -0,0 +1,38 @@
name: docker-publish
on:
workflow_dispatch:
jobs:
publish-dockerhub:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Get artifacts
run: |
bash get_artifacts.sh ${{ secrets.GITHUB_TOKEN }} $(curl "https://api.github.com/repos/NapNeko/NapCatQQ/releases/latest" | jq -r '.tag_name')
- name: Set up Docker buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
# Fork from https://github.com/koishijs/boilerplate/blob/master/.github/workflows/docker.yml
- name: Run buildx and push
env:
DOCKER_REPO: mlikiowa/napcat-docker
GITHUB_REPO: NapNeko/NapCatQQ
run: |
TAG=$(curl "https://api.github.com/repos/NapNeko/NapCatQQ/releases/latest" | jq -r '.tag_name')
docker buildx build \
--output "type=image,push=true" \
--platform linux/amd64,linux/arm64 \
--tag ${DOCKER_REPO}:$TAG \
--tag ${DOCKER_REPO}:latest \
--file ./Dockerfile \
.
- name: Docker Hub logout
if: always()
run: docker logout

24
Dockerfile.txt Normal file
View File

@ -0,0 +1,24 @@
FROM mlikiowa/napcat-docker:base
WORKDIR /usr/src/app
COPY SignerServer-ubuntu-latest-x64.zip .
# 安装 Linux QQ
RUN arch=$(arch | sed s/aarch64/arm64/ | sed s/x86_64/amd64/) && \
curl -o linuxqq.deb https://dldir1.qq.com/qqfile/qq/QQNT/8b4fdf81/linuxqq_3.2.7-23361_${arch}.deb && \
dpkg -i --force-depends linuxqq.deb && rm linuxqq.deb
# 安装 SignerServer
RUN arch=$(arch | sed s/aarch64/arm64/ | sed s/x86_64/x64/) && \
unzip SignerServer-ubuntu-latest-${arch}.zip && \
chrom +x start.sh
# 配置 supervisord
RUN echo "[supervisord]" > /etc/supervisord.conf && \
echo "nodaemon=true" >> /etc/supervisord.conf && \
echo "[program:napcat]" >> /etc/supervisord.conf && \
echo "command=COMMAND" >> /etc/supervisord.conf
ENTRYPOINT ["sh", "start.sh"]

View File

@ -43,7 +43,7 @@ std::map<std::string, uint64_t> addrMap = {
{"6.9.20-17153", 0x1c73dd0}}; {"6.9.20-17153", 0x1c73dd0}};
#endif #endif
#elif defined(_LINUX_PLATFORM_) #elif defined(_LINUX_PLATFORM_)
#define CURRENT_VERSION "3.1.2-13107" #define CURRENT_VERSION "3.2.7-23361"
#if defined(_X64_ARCH_) #if defined(_X64_ARCH_)
std::map<std::string, uint64_t> addrMap = { std::map<std::string, uint64_t> addrMap = {
{"3.1.2-12912", 0x33C38E0}, {"3.1.2-12912", 0x33C38E0},