fix: why?
This commit is contained in:
parent
5bbcc1d4ef
commit
0cf13cdee1
1 changed files with 26 additions and 26 deletions
52
.github/workflows/build-singbox-docker.yml
vendored
52
.github/workflows/build-singbox-docker.yml
vendored
|
@ -30,32 +30,6 @@ jobs:
|
||||||
uses: docker/setup-buildx-action@v2
|
uses: docker/setup-buildx-action@v2
|
||||||
- name: Setup QEMU for Docker Buildx
|
- name: Setup QEMU for Docker Buildx
|
||||||
uses: docker/setup-qemu-action@v2
|
uses: docker/setup-qemu-action@v2
|
||||||
- name: Select Dockerfile
|
|
||||||
run: |
|
|
||||||
if [[ "${{ matrix.buildType }}" == "full" ]]; then
|
|
||||||
if [[ "${{ matrix.distro }}" == "distroless" ]]; then
|
|
||||||
cp "$GITHUB_WORKSPACE/action/dockerfiles/Dockerfile.distroless.full" Dockerfile
|
|
||||||
echo "tag_postfix=full-distroless" >> $GITHUB_OUTPUT
|
|
||||||
else
|
|
||||||
cp "$GITHUB_WORKSPACE/action/dockerfiles/Dockerfile.full" Dockerfile
|
|
||||||
echo "tag_postfix=full" >> $GITHUB_OUTPUT
|
|
||||||
fi
|
|
||||||
elif [[ "${{ matrix.buildType }}" == "minimized" ]]; then
|
|
||||||
if [[ "${{ matrix.distro }}" == "distroless" ]]; then
|
|
||||||
cp "$GITHUB_WORKSPACE/action/dockerfiles/Dockerfile.distroless.minimized" Dockerfile
|
|
||||||
echo "tag_postfix=mini-distroless" >> $GITHUB_OUTPUT
|
|
||||||
else
|
|
||||||
cp "$GITHUB_WORKSPACE/action/dockerfiles/Dockerfile.minimized" Dockerfile
|
|
||||||
echo "tag_postfix=mini" >> $GITHUB_OUTPUT
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
if [[ "${{ matrix.distro }}" == "distroless" ]]; then
|
|
||||||
cp "$GITHUB_WORKSPACE/action/dockerfiles/Dockerfile.distroless.standard" Dockerfile
|
|
||||||
echo "tag_postfix=distroless" >> $GITHUB_OUTPUT
|
|
||||||
else
|
|
||||||
cp "$GITHUB_WORKSPACE/action/dockerfiles/Dockerfile.standard" Dockerfile
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
- name: Login to Docker Hub Container Registry
|
- name: Login to Docker Hub Container Registry
|
||||||
uses: docker/login-action@v2
|
uses: docker/login-action@v2
|
||||||
with:
|
with:
|
||||||
|
@ -66,6 +40,32 @@ jobs:
|
||||||
uses: docker/metadata-action@v4
|
uses: docker/metadata-action@v4
|
||||||
with:
|
with:
|
||||||
images: etnperlong/sing-box
|
images: etnperlong/sing-box
|
||||||
|
- name: Select Dockerfile
|
||||||
|
run: |
|
||||||
|
if [[ "${{ matrix.buildType }}" == "full" ]]; then
|
||||||
|
if [[ "${{ matrix.distro }}" == "distroless" ]]; then
|
||||||
|
cp "$GITHUB_WORKSPACE/action/dockerfiles/Dockerfile.distroless.full" "$GITHUB_WORKSPACE/Dockerfile"
|
||||||
|
echo "tag_postfix=full-distroless" >> $GITHUB_OUTPUT
|
||||||
|
else
|
||||||
|
cp "$GITHUB_WORKSPACE/action/dockerfiles/Dockerfile.full" "$GITHUB_WORKSPACE/Dockerfile"
|
||||||
|
echo "tag_postfix=full" >> $GITHUB_OUTPUT
|
||||||
|
fi
|
||||||
|
elif [[ "${{ matrix.buildType }}" == "minimized" ]]; then
|
||||||
|
if [[ "${{ matrix.distro }}" == "distroless" ]]; then
|
||||||
|
cp "$GITHUB_WORKSPACE/action/dockerfiles/Dockerfile.distroless.minimized" "$GITHUB_WORKSPACE/Dockerfile"
|
||||||
|
echo "tag_postfix=mini-distroless" >> $GITHUB_OUTPUT
|
||||||
|
else
|
||||||
|
cp "$GITHUB_WORKSPACE/action/dockerfiles/Dockerfile.minimized" "$GITHUB_WORKSPACE/Dockerfile"
|
||||||
|
echo "tag_postfix=mini" >> $GITHUB_OUTPUT
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
if [[ "${{ matrix.distro }}" == "distroless" ]]; then
|
||||||
|
cp "$GITHUB_WORKSPACE/action/dockerfiles/Dockerfile.distroless.standard" "$GITHUB_WORKSPACE/Dockerfile"
|
||||||
|
echo "tag_postfix=distroless" >> $GITHUB_OUTPUT
|
||||||
|
else
|
||||||
|
cp "$GITHUB_WORKSPACE/action/dockerfiles/Dockerfile.standard" "$GITHUB_WORKSPACE/Dockerfile"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
- name: Get tag to build
|
- name: Get tag to build
|
||||||
id: tag
|
id: tag
|
||||||
run: |
|
run: |
|
||||||
|
|
Loading…
Reference in a new issue