fix: enable full version alpine build only

This commit is contained in:
Mike Evans 2023-06-22 17:42:59 +01:00 committed by GitHub
parent 2971d33915
commit 79835f6414
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 11 additions and 21 deletions

View file

@ -12,8 +12,8 @@ jobs:
strategy:
fail-fast: true
matrix:
buildType: [standard, minimized, full]
distro: [alpine, distroless]
buildType: [full]
distro: [alpine]
runs-on: ubuntu-latest
steps:
- name: Checkout Source Code of 'SagerNet/sing-box'

View file

@ -12,8 +12,8 @@ jobs:
strategy:
fail-fast: true
matrix:
buildType: [standard, minimized, full]
distro: [alpine, distroless]
buildType: [full]
distro: [alpine]
runs-on: ubuntu-latest
steps:
- name: Checkout Source Code of 'SagerNet/sing-box'
@ -70,10 +70,10 @@ jobs:
- name: Get tag to build
id: tag
run: |
if [[ "${{ matrix.distro }}" == "alpine" && "${{ matrix.buildType }}" == "standard" ]]; then
if [[ "${{ matrix.distro }}" == "alpine" && "${{ matrix.buildType }}" == "full" ]]; then
echo "latest=etnperlong/sing-box:latest" >> $GITHUB_OUTPUT
fi
if [[ "${{ matrix.distro }}" == "distroless" && "${{ matrix.buildType }}" == "standard" ]]; then
if [[ "${{ matrix.distro }}" == "distroless" && "${{ matrix.buildType }}" == "full" ]]; then
echo "latest=etnperlong/sing-box:distroless" >> $GITHUB_OUTPUT
fi
if [[ -z "${{ github.event.inputs.tag }}" ]]; then

View file

@ -4,9 +4,9 @@
[sing-box](https://sing-box.sagernet.org/) is a universal proxy platform for building your own proxy.
Docker images are built for quick deployment in various computing cloud providers.
Docker images are designed for rapid deployment to various computing cloud providers.
For more information on docker and containerization technologies, refer to [official document](https://docs.docker.com/).
For more information on Docker and containerization technologies, read the [official document](https://docs.docker.com/).
## Documentation
@ -22,15 +22,9 @@ For more information on docker and containerization technologies, refer to [offi
## Enabled features
- `standard`
> `with_gvisor,with_quic,with_wireguard,with_utls,with_reality_server,with_clash_api,with_acme`
- `full`
**Full version!**
> `with_gvisor,with_quic,with_grpc,with_dhcp,with_wireguard,with_shadowsocksr,with_ech,with_utls,with_reality_server,with_clash_api,with_v2ray_api,with_acme`
- `mini`
> `with_quic,with_utls,with_reality_server`
## Supported tags
- `latest` *([latest release](https://github.com/SagerNet/sing-box/releases))*
@ -38,8 +32,4 @@ For more information on docker and containerization technologies, refer to [offi
- `dev` *([dev branch](https://github.com/SagerNet/sing-box/tree/dev))*
- `dev-next` *([dev-next branch](https://github.com/SagerNet/sing-box/tree/dev))*
## Additional distro
Add `-distroless` to the end of the tag to use the build of distroless images.
For example, `etnperlong/sing-box:dev-next-full-distroless` is the distroless build of full feature enabled image.
For example, `etnperlong/sing-box:dev-next` means a fully functional docker image.

View file

@ -9,7 +9,7 @@ RUN set -ex \
&& apk add git build-base \
&& export COMMIT=$(git rev-parse --short HEAD) \
&& export VERSION=$(go run ./cmd/internal/read_tag) \
&& go build -v -trimpath -tags with_gvisor,with_quic,with_wireguard,with_utls,with_reality_server,with_clash_api,with_acme \
&& go build -v -trimpath -tags with_gvisor,with_quic,with_dhcp,with_wireguard,with_utls,with_reality_server,with_clash_api,with_acme \
-o /go/bin/sing-box \
-ldflags "-X \"github.com/sagernet/sing-box/constant.Version=$VERSION\" -s -w -buildid=" \
./cmd/sing-box