mirror of
https://github.com/nitezs/sub2sing-box.git
synced 2024-12-23 15:14:43 -05:00
mod
This commit is contained in:
parent
4b02c39317
commit
a2596b1880
@ -15,7 +15,6 @@ builds:
|
|||||||
- -s -w -X sub2sing-box/constant.Version={{ .Version }}
|
- -s -w -X sub2sing-box/constant.Version={{ .Version }}
|
||||||
flags:
|
flags:
|
||||||
- -trimpath
|
- -trimpath
|
||||||
no_unique_dist_dir: true
|
|
||||||
archives:
|
archives:
|
||||||
- format: tar.gz
|
- format: tar.gz
|
||||||
format_overrides:
|
format_overrides:
|
||||||
|
@ -6,7 +6,7 @@ steps:
|
|||||||
- name: build
|
- name: build
|
||||||
image: woodpeckerci/plugin-docker-buildx
|
image: woodpeckerci/plugin-docker-buildx
|
||||||
settings:
|
settings:
|
||||||
platforms: linux/amd64
|
platforms: linux/amd64,linux/arm64,linux/arm/v7
|
||||||
repo: nite07/sub2sing-box
|
repo: nite07/sub2sing-box
|
||||||
tag: nightly
|
tag: nightly
|
||||||
username: nite07
|
username: nite07
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
when:
|
when:
|
||||||
event: tag
|
event: tag
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: build
|
- name: build
|
||||||
image: woodpeckerci/plugin-docker-buildx
|
image: woodpeckerci/plugin-docker-buildx
|
||||||
settings:
|
settings:
|
||||||
platforms: linux/amd64
|
platforms: linux/amd64,linux/arm64,linux/arm/v7
|
||||||
repo: nite07/sub2sing-box
|
repo: nite07/sub2sing-box
|
||||||
tag: ${CI_COMMIT_TAG}
|
auto_tag: true
|
||||||
username: nite07
|
username: nite07
|
||||||
password:
|
password:
|
||||||
from_secret: docker_password
|
from_secret: docker_password
|
||||||
|
10
Dockerfile
10
Dockerfile
@ -2,25 +2,17 @@ FROM golang:1.21 as builder
|
|||||||
LABEL authors="nite07"
|
LABEL authors="nite07"
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
RUN go mod download
|
RUN go mod download
|
||||||
|
|
||||||
ARG version
|
ARG version
|
||||||
|
RUN CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w -X sub2sing-box/constant.Version=${version}" -o sub2sing-box .
|
||||||
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-s -w -X sub2sing-box/constant.Version=${version}" -o sub2sing-box main.go
|
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
FROM alpine:latest
|
FROM alpine:latest
|
||||||
|
|
||||||
COPY --from=builder /app/sub2sing-box /app/sub2sing-box
|
COPY --from=builder /app/sub2sing-box /app/sub2sing-box
|
||||||
COPY --from=builder /app/templates /app/templates-origin
|
COPY --from=builder /app/templates /app/templates-origin
|
||||||
COPY --from=builder /app/entrypoint.sh /app/entrypoint.sh
|
COPY --from=builder /app/entrypoint.sh /app/entrypoint.sh
|
||||||
|
|
||||||
RUN chmod +x /app/entrypoint.sh
|
RUN chmod +x /app/entrypoint.sh
|
||||||
|
|
||||||
VOLUME [ "/app/templates" ]
|
VOLUME [ "/app/templates" ]
|
||||||
EXPOSE 8080
|
EXPOSE 8080
|
||||||
|
|
||||||
ENTRYPOINT ["/app/entrypoint.sh"]
|
ENTRYPOINT ["/app/entrypoint.sh"]
|
||||||
|
Loading…
Reference in New Issue
Block a user