mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-04-20 05:52:24 +00:00
github actions
docker build envs docker image github actions
This commit is contained in:
parent
978b5af865
commit
79655b96ae
5 changed files with 11 additions and 13 deletions
4
.github/workflows/docker.yml
vendored
4
.github/workflows/docker.yml
vendored
|
@ -19,8 +19,8 @@ jobs:
|
|||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: |
|
||||
hsanaeii/3x-ui
|
||||
ghcr.io/mhsanaei/3x-ui
|
||||
serogaq/3x-ui
|
||||
ghcr.io/serogaq/3x-ui
|
||||
tags: |
|
||||
type=ref,event=branch
|
||||
type=ref,event=tag
|
||||
|
|
|
@ -42,16 +42,16 @@ cd ../../
|
|||
# Antizapret
|
||||
case $2 in
|
||||
0)
|
||||
ANTIZAPRET="0"
|
||||
BUILD_WITH_ANTIZAPRET="0"
|
||||
;;
|
||||
1)
|
||||
ANTIZAPRET="1"
|
||||
BUILD_WITH_ANTIZAPRET="1"
|
||||
;;
|
||||
*)
|
||||
ANTIZAPRET="0"
|
||||
BUILD_WITH_ANTIZAPRET="0"
|
||||
;;
|
||||
esac
|
||||
if [[ $ANTIZAPRET == "1" ]]; then
|
||||
if [[ $BUILD_WITH_ANTIZAPRET == "1" ]]; then
|
||||
wget https://github.com/warexify/antizapret-xray/archive/refs/heads/main.zip
|
||||
unzip main.zip
|
||||
mv antizapret-xray-main antizapret-xray
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
FROM golang:1.23-alpine AS builder
|
||||
WORKDIR /app
|
||||
ARG TARGETARCH
|
||||
ARG ANTIZAPRET
|
||||
ARG BUILD_WITH_ANTIZAPRET
|
||||
|
||||
RUN apk --no-cache --update add \
|
||||
build-base \
|
||||
|
@ -17,7 +17,7 @@ COPY . .
|
|||
ENV CGO_ENABLED=1
|
||||
ENV CGO_CFLAGS="-D_LARGEFILE64_SOURCE"
|
||||
RUN go build -o build/x-ui main.go
|
||||
RUN ./DockerInit.sh "$TARGETARCH" "$ANTIZAPRET"
|
||||
RUN ./DockerInit.sh "$TARGETARCH" "$BUILD_WITH_ANTIZAPRET"
|
||||
|
||||
# ========================================================
|
||||
# Stage: Final Image of 3x-ui
|
||||
|
|
|
@ -1,10 +1,7 @@
|
|||
---
|
||||
services:
|
||||
ui:
|
||||
build:
|
||||
context: .
|
||||
args:
|
||||
ANTIZAPRET: "${BUILD_WITH_ANTIZAPRET:-0}"
|
||||
image: ghcr.io/serogaq/3x-ui:latest
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
|
|
|
@ -45,7 +45,8 @@
|
|||
"levels": {
|
||||
"0": {
|
||||
"statsUserDownlink": true,
|
||||
"statsUserUplink": true
|
||||
"statsUserUplink": true,
|
||||
"statsUserOnline": true
|
||||
}
|
||||
},
|
||||
"system": {
|
||||
|
|
Loading…
Reference in a new issue