File tree Expand file tree Collapse file tree 3 files changed +13
-18
lines changed
Expand file tree Collapse file tree 3 files changed +13
-18
lines changed Original file line number Diff line number Diff line change 1818
1919jobs :
2020 push_to_registry :
21- name : Push Docker image to Docker Hub
21+ name : Push Multi-Arch Docker image to Docker Hub
2222 runs-on : ubuntu-latest
2323 permissions :
2424 packages : write
2525 contents : read
2626 attestations : write
2727 id-token : write
28- strategy :
29- matrix :
30- platform :
31- - linux/amd64
32- - linux/arm64
3328 steps :
3429 - name : Check out the repo
3530 uses : actions/checkout@v5
@@ -58,13 +53,13 @@ jobs:
5853 type=sha
5954 type=raw,value=latest,enable={{is_default_branch}}
6055
61- - name : Build and push Docker image
56+ - name : Build and push Multi-Arch Docker image
6257 id : push
6358 uses : docker/build-push-action@v5
6459 with :
6560 context : .
6661 file : ./Dockerfile
67- platforms : ${{ matrix.platform }}
62+ platforms : linux/amd64,linux/arm64
6863 push : true
6964 tags : ${{ steps.meta.outputs.tags }}
7065 labels : ${{ steps.meta.outputs.labels }}
Original file line number Diff line number Diff line change @@ -16,19 +16,19 @@ RUN set -e; \
1616 else \
1717 echo "Unsupported architecture: $ARCH" ; exit 1; \
1818 fi; \
19- mkdir -p /usr/local/bin /usr/local/etc/ aio /var/log /aio; \
20- chmod 0755 /usr/local/etc/ aio /var/log /aio; \
19+ mkdir -p /var/log/ aio /etc /aio; \
20+ chmod 0755 /var/log/ aio /etc /aio; \
2121 LATEST=$(curl -sL https://api.github.com/repos/uerax/all-in-one-bot/releases/latest | grep "tag_name" | cut -d '"' -f 4); \
22- curl -L "https://github.com/uerax/all-in-one-bot/releases/download/$LATEST/$AIO_BIN" -o /usr/local/bin /aio; \
23- chmod +x /usr/local/bin /aio; \
24- if [ ! -f /usr/local/ etc/aio/all-in-one-bot.yml ]; then \
25- curl -L "https://raw.githubusercontent.com/uerax/all-in-one-bot/master/all-in-one-bot.yml" -o /usr/local/ etc/aio/all-in-one-bot.yml; \
26- echo "Configuration downloaded. Please edit /usr/local/etc /aio/all-in-one-bot.yml and restart the container." ; \
22+ curl -L "https://github.com/uerax/all-in-one-bot/releases/download/$LATEST/$AIO_BIN" -o /var/lib /aio; \
23+ chmod +x /var/lib /aio; \
24+ if [ ! -f /etc/aio/all-in-one-bot.yml ]; then \
25+ curl -L "https://raw.githubusercontent.com/uerax/all-in-one-bot/master/all-in-one-bot.yml" -o /etc/aio/all-in-one-bot.yml; \
26+ echo "Configuration downloaded. Please edit /var/lib /aio/all-in-one-bot.yml and restart the container." ; \
2727 exit 0; \
2828 fi
2929
3030VOLUME ["/var/log/aio" ]
3131
3232ENV TZ=Asia/Shanghai
3333
34- CMD ["/usr/local/bin/aio" , "-c" , "/usr/local/etc /aio/all-in-one-bot.yml" ]
34+ CMD ["/usr/local/bin/aio" , "-c" , "/var/lib /aio/all-in-one-bot.yml" ]
Original file line number Diff line number Diff line change @@ -10,12 +10,12 @@ services:
1010 # Config directory: on first startup, if config doesn't exist,
1111 # entrypoint copies the default from image here. Edit the config
1212 # and restart the container with: docker compose restart bot
13- - ./config:/usr/local/etc /aio
13+ - ./config:/var/lib /aio
1414 - ./logs:/var/log/aio
1515 networks :
1616 - botnet
1717 healthcheck :
18- test : ["CMD-SHELL", "test -x /usr/local/bin /aio || exit 1"]
18+ test : ["CMD-SHELL", "test -x /var/lib /aio || exit 1"]
1919 interval : 30s
2020 timeout : 10s
2121 retries : 3
You can’t perform that action at this time.
0 commit comments