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
|
||||
- name: Setup QEMU for Docker Buildx
|
||||
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
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
|
@ -66,6 +40,32 @@ jobs:
|
|||
uses: docker/metadata-action@v4
|
||||
with:
|
||||
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
|
||||
id: tag
|
||||
run: |
|
||||
|
|
Loading…
Reference in a new issue