fix: context
This commit is contained in:
parent
0cf13cdee1
commit
dddb62aae9
1 changed files with 9 additions and 7 deletions
16
.github/workflows/build-singbox-docker.yml
vendored
16
.github/workflows/build-singbox-docker.yml
vendored
|
@ -41,27 +41,28 @@ jobs:
|
||||||
with:
|
with:
|
||||||
images: etnperlong/sing-box
|
images: etnperlong/sing-box
|
||||||
- name: Select Dockerfile
|
- name: Select Dockerfile
|
||||||
|
id: dockerfile
|
||||||
run: |
|
run: |
|
||||||
if [[ "${{ matrix.buildType }}" == "full" ]]; then
|
if [[ "${{ matrix.buildType }}" == "full" ]]; then
|
||||||
if [[ "${{ matrix.distro }}" == "distroless" ]]; then
|
if [[ "${{ matrix.distro }}" == "distroless" ]]; then
|
||||||
cp "$GITHUB_WORKSPACE/action/dockerfiles/Dockerfile.distroless.full" "$GITHUB_WORKSPACE/Dockerfile"
|
cp "$GITHUB_WORKSPACE/action/dockerfiles/Dockerfile.distroless.full" "$GITHUB_WORKSPACE/Dockerfile"
|
||||||
echo "tag_postfix=full-distroless" >> $GITHUB_OUTPUT
|
echo "tagpost=full-distroless" >> $GITHUB_OUTPUT
|
||||||
else
|
else
|
||||||
cp "$GITHUB_WORKSPACE/action/dockerfiles/Dockerfile.full" "$GITHUB_WORKSPACE/Dockerfile"
|
cp "$GITHUB_WORKSPACE/action/dockerfiles/Dockerfile.full" "$GITHUB_WORKSPACE/Dockerfile"
|
||||||
echo "tag_postfix=full" >> $GITHUB_OUTPUT
|
echo "tagpost=full" >> $GITHUB_OUTPUT
|
||||||
fi
|
fi
|
||||||
elif [[ "${{ matrix.buildType }}" == "minimized" ]]; then
|
elif [[ "${{ matrix.buildType }}" == "minimized" ]]; then
|
||||||
if [[ "${{ matrix.distro }}" == "distroless" ]]; then
|
if [[ "${{ matrix.distro }}" == "distroless" ]]; then
|
||||||
cp "$GITHUB_WORKSPACE/action/dockerfiles/Dockerfile.distroless.minimized" "$GITHUB_WORKSPACE/Dockerfile"
|
cp "$GITHUB_WORKSPACE/action/dockerfiles/Dockerfile.distroless.minimized" "$GITHUB_WORKSPACE/Dockerfile"
|
||||||
echo "tag_postfix=mini-distroless" >> $GITHUB_OUTPUT
|
echo "tagpost=mini-distroless" >> $GITHUB_OUTPUT
|
||||||
else
|
else
|
||||||
cp "$GITHUB_WORKSPACE/action/dockerfiles/Dockerfile.minimized" "$GITHUB_WORKSPACE/Dockerfile"
|
cp "$GITHUB_WORKSPACE/action/dockerfiles/Dockerfile.minimized" "$GITHUB_WORKSPACE/Dockerfile"
|
||||||
echo "tag_postfix=mini" >> $GITHUB_OUTPUT
|
echo "tagpost=mini" >> $GITHUB_OUTPUT
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
if [[ "${{ matrix.distro }}" == "distroless" ]]; then
|
if [[ "${{ matrix.distro }}" == "distroless" ]]; then
|
||||||
cp "$GITHUB_WORKSPACE/action/dockerfiles/Dockerfile.distroless.standard" "$GITHUB_WORKSPACE/Dockerfile"
|
cp "$GITHUB_WORKSPACE/action/dockerfiles/Dockerfile.distroless.standard" "$GITHUB_WORKSPACE/Dockerfile"
|
||||||
echo "tag_postfix=distroless" >> $GITHUB_OUTPUT
|
echo "tagpost=distroless" >> $GITHUB_OUTPUT
|
||||||
else
|
else
|
||||||
cp "$GITHUB_WORKSPACE/action/dockerfiles/Dockerfile.standard" "$GITHUB_WORKSPACE/Dockerfile"
|
cp "$GITHUB_WORKSPACE/action/dockerfiles/Dockerfile.standard" "$GITHUB_WORKSPACE/Dockerfile"
|
||||||
fi
|
fi
|
||||||
|
@ -73,8 +74,8 @@ jobs:
|
||||||
if [[ -z "${{ github.event.inputs.tag }}" ]]; then
|
if [[ -z "${{ github.event.inputs.tag }}" ]]; then
|
||||||
echo "versioned=etnperlong/sing-box:${{ github.ref_name }}" >> $GITHUB_OUTPUT
|
echo "versioned=etnperlong/sing-box:${{ github.ref_name }}" >> $GITHUB_OUTPUT
|
||||||
else
|
else
|
||||||
if [[ -z "${{ steps.tag.outputs.tag_postfix }}" ]]; then
|
if [[ -z "${{ steps.dockerfile.outputs.tagpost }}" ]]; then
|
||||||
echo "versioned=etnperlong/sing-box:${{ github.event.inputs.tag }}-${{ steps.tag.outputs.tag_postfix }}" >> $GITHUB_OUTPUT
|
echo "versioned=etnperlong/sing-box:${{ github.event.inputs.tag }}-${{ steps.dockerfile.outputs.tagpost }}" >> $GITHUB_OUTPUT
|
||||||
else
|
else
|
||||||
echo "versioned=etnperlong/sing-box:${{ github.event.inputs.tag }}" >> $GITHUB_OUTPUT
|
echo "versioned=etnperlong/sing-box:${{ github.event.inputs.tag }}" >> $GITHUB_OUTPUT
|
||||||
fi
|
fi
|
||||||
|
@ -82,6 +83,7 @@ jobs:
|
||||||
- name: Build and release Docker images
|
- name: Build and release Docker images
|
||||||
uses: docker/build-push-action@v4
|
uses: docker/build-push-action@v4
|
||||||
with:
|
with:
|
||||||
|
context: .
|
||||||
platforms: linux/386,linux/amd64,linux/arm64,linux/arm/v7,linux/s390x
|
platforms: linux/386,linux/amd64,linux/arm64,linux/arm/v7,linux/s390x
|
||||||
target: dist
|
target: dist
|
||||||
tags: |
|
tags: |
|
||||||
|
|
Loading…
Reference in a new issue